Compare commits

..

20 Commits

Author SHA1 Message Date
Jay Lee
92b8ea6dcd GAM 4.71 2019-04-16 08:34:20 -04:00
Jay Lee
1654dee62e re-enable IndexError 2019-04-16 08:33:41 -04:00
Ross Scroggs
2316b9e76a Allow adding customer Id to group (#889)
Customer ID is properly recognized in normalizeEmailAddressOrUID if CUSTOMER_ID envirement variable is set. This change then properly labels it ads'id', not 'email'.
2019-04-15 16:52:43 -04:00
Ross Scroggs
b095b361cb Update group settings documentation, eliminate maxMessageBytes (#886) 2019-04-15 15:18:29 -04:00
ejochman
fe7c72beac Fixes scope menu issue in #884 (#888)
Adds proper inheritance of object to ScopeMenuOption and ScopeSelectionMenu which fixes the issue of property setters not being called.
Also initialize all private members during __init__
2019-04-15 15:17:47 -04:00
Jay Lee
9930209980 give up on MacOS 10.12 Sierra and 32-bit Linux for now 2019-04-15 13:24:02 -04:00
Jay Lee
48553f4ad9 Linux / MacOS changes 2019-04-15 13:09:05 -04:00
Jay Lee
a7bb600bf5 try again 2019-04-15 11:58:09 -04:00
Jay Lee
57938b19a8 more platforms stuff 2019-04-15 11:45:24 -04:00
Jay Lee
8d485f4f74 more arch stuff 2019-04-15 11:30:17 -04:00
Jay Lee
8db6d1f4f7 split travis to per-image profiles 2019-04-15 11:18:20 -04:00
Jay Lee
6198f7ace3 Update .travis.yml 2019-04-15 09:16:58 -04:00
Jay Lee
9472fb2a4c Update .travis.yml 2019-04-15 09:12:22 -04:00
Jay Lee
8fdc49a0af Update .travis.yml 2019-04-15 09:07:31 -04:00
Jay Lee
639cede6c4 Update .travis.yml 2019-04-15 09:03:58 -04:00
Jay Lee
65fd49e377 Update .travis.yml 2019-04-15 08:57:43 -04:00
Jay Lee
4e141bf764 always use latest pip 2019-04-15 08:51:28 -04:00
Jay Lee
2db40e841b Update .travis.yml 2019-04-15 08:45:24 -04:00
Jay Lee
1f728ff4da Update .travis.yml 2019-04-15 08:38:28 -04:00
Jay Lee
4c43b28820 Update .travis.yml 2019-04-15 08:33:12 -04:00
18 changed files with 120 additions and 69 deletions

View File

@@ -10,67 +10,28 @@ matrix:
env:
- GAMOS=linux
- PLATFORM=x86_64
# - os: linux
# language: python
# dist: precise
# python:
# - "2.7.15"
# env:
# - GAMOS=linux
# - PLATFORM=i686
- os: osx
language: generic
osx_image: xcode10.1
env:
- GAMOS=macos
- PLATFORM=x64
addons:
homebrew:
packages:
python@2
- PLATFORM=x86_64
- os: windows
language: shell
env:
- GAMOS=windows
PLATFORM=x64
CINST_ARGS=""
PLATFORM=x86_64
- os: windows
language: shell
env:
- GAMOS=windows
- CINST_ARGS=--forcex86
- PLATFORM=x86
before_install:
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
powershell Install-WindowsFeature Net-Framework-Core;
cinst -y $CINST_ARGS python2;
export PATH=$PATH:/c/Python27/scripts;
cinst -y wixtoolset;
fi
- pip install pyinstaller
- source src/travis/$TRAVIS_OS_NAME-$PLATFORM-before-install.sh
install:
- cd src
- pyinstaller --clean -F --distpath=gam $GAMOS-gam.spec
- gam/gam version
- export GAMVERSION=`gam/gam version simple`
- cp LICENSE gam
- cp whatsnew.txt gam
- cp GamCommands.txt gam
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
cp gam-setup.bat gam;
GAM_ARCHIVE=gam-$GAMVERSION-$GAMOS-$PLATFORM.zip;
/c/Program\ Files/7-Zip/7z.exe a -tzip $GAM_ARCHIVE gam -xr!.svn;
mkdir gam-64;
cp -rf gam/* gam-64/;
/c/Program\ Files\ \(x86\)/WiX\ Toolset\ v3.11/bin/candle.exe -arch $PLATFORM gam.wxs;
/c/Program\ Files\ \(x86\)/Wix\ Toolset\ v3.11/bin/light.exe -ext /c/Program\ Files\ \(x86\)/WiX\ Toolset\ v3.11/bin/WixUIExtension.dll gam.wixobj -o gam-$GAMVERSION-$GAMOS-$PLATFORM.msi || true;
rm *.wixpdb;
else
GAM_ARCHIVE=gam-$GAMVERSION-$GAMOS-$PLATFORM.tar.xz;
tar cfJ $GAM_ARCHIVE gam/;
fi
- source src/travis/$TRAVIS_OS_NAME-$PLATFORM-install.sh
script:
- gam/gam version

View File

@@ -352,7 +352,6 @@ If an item contains spaces, it should be surrounded by ".
admincreated|
aliases|
allowexternalmembers|
allowgooglecommunication|
allowwebposting|
archiveonly|
customfootertext|
@@ -363,14 +362,11 @@ If an item contains spaces, it should be surrounded by ".
directmemberscount|
email|
enablecollaborativeinbox|collaborative|
favoriterepliesontop|
id|
includecustomfooter|
includeinglobaladdresslist|gal|
isarchived|
maxmessagebytes|
memberscanpostasthegroup|
messagedisplayfont|
messagemoderationlevel|
name|
primarylanguage|
@@ -378,7 +374,6 @@ If an item contains spaces, it should be surrounded by ".
sendmessagedenynotification|
showingroupdirectory|
spammoderationlevel|
whocanaddreferences|
whocanadd|
whocanapprovemessages|
whocanassigntopics|
@@ -396,7 +391,6 @@ If an item contains spaces, it should be surrounded by ".
whocanmaketopicssticky|
whocanmarkduplicate|
whocanmarkfavoritereplyonanytopic|
whocanmarkfavoritereplyonowntopic|
whocanmarknoresponseneeded|
whocanmoderatecontent|
whocanmodifytagsandcategories|
@@ -736,20 +730,12 @@ Specify a collection of Users by directly specifying them or by specifiying item
(whocanbanusers all_members|owners_and_managers|owners_only|none)|
(whocaninvite all_members_can_invite|all_managers_can_invite|all_owners_can_invite|none_can_invite)|
(whocanmodifymembers all_members|owners_and_managers|owners_only|none)
<GroupDeprecatedAttribute> ::=
(allowgooglecommunication <Boolean>)|
(favoriterepliesontop <Boolean>)|
(maxmessagebytes <ByteCount>)|
(messagedisplayfont default_font|fixed_width_font)|
(whocanaddreferences all_members|owners_and_managers|managers_only|owners_only|none)|
(whocanmarkfavoritereplyonowntopic all_members|owners_and_managers|managers_only|owners_only|none)
<GroupAttribute> ::=
<GroupSettingsAttribute>|
<GroupWhoCanDiscoverGroupAttribute>|
<GroupWhoCanAssistContentAttribute>|
<GroupWhoCanModerateContentAttribute>|
<GroupWhoCanModerateMembersAttribute>|
<GroupDeprecatedAttribute>
<GroupWhoCanModerateMembersAttribute>
<MobileAction> ::=
admin_remote_wipe|wipe|admin_account_wipe|accountwipe|wipeaccount|approve|block|cancel_remote_wipe_then_activate|cancel_remote_wipe_then_block

View File

@@ -8873,7 +8873,7 @@ def doUpdateGroup():
item.append(user_email)
items.append(item)
else:
body = {u'role': role, u'email': users_email[0]}
body = {u'role': role, u'email' if users_email[0].find(u'@') != -1 else u'id': users_email[0]}
add_text = [u'as %s' % role]
if delivery:
body[u'delivery_settings'] = delivery
@@ -10985,7 +10985,6 @@ GROUP_ATTRIBUTES_ARGUMENT_TO_PROPERTY_MAP = {
u'includecustomfooter': u'includeCustomFooter',
u'includeinglobaladdresslist': u'includeInGlobalAddressList',
u'isarchived': u'isArchived',
u'maxmessagebytes': u'maxMessageBytes',
u'memberscanpostasthegroup': u'membersCanPostAsTheGroup',
u'messagemoderationlevel': u'messageModerationLevel',
u'primarylanguage': u'primaryLanguage',
@@ -12686,7 +12685,7 @@ def getScopesFromUser(menu_options=None):
return menu.get_selected_scopes()
class ScopeMenuOption():
class ScopeMenuOption(object):
"""A single GAM API/feature with scopes that can be turned on/off."""
def __init__(self, oauth_scopes, description,
@@ -12717,6 +12716,9 @@ class ScopeMenuOption():
restriction: String, the currently enabled restriction on all scopes in
this ScopeMenuOption. Default is no restrictions (highest permission).
"""
# Initialize private members
self._is_selected = False
self._restriction = None
self.scopes = oauth_scopes
self.description = description
@@ -12725,7 +12727,8 @@ class ScopeMenuOption():
self.is_selected = is_required or is_selected
self.supported_restrictions = (
supported_restrictions if supported_restrictions is not None else [])
self._restriction = restriction
if restriction:
self.restrict_to(restriction)
def select(self, restriction=None):
"""Selects/enables the ScopeMenuOption with an optional restriction."""
@@ -12790,7 +12793,7 @@ class ScopeMenuOption():
error = 'Scope does not support a %s restriction.' % restriction
if self.supported_restrictions is not None:
restriction_list = ', '.join(self.supported_restrictions)
error.append(' Supported restrictions are: %s' % restriction_list)
error = error + (' Supported restrictions are: %s' % restriction_list)
raise ValueError(error)
def unrestrict(self):
@@ -12850,7 +12853,7 @@ class ScopeMenuOption():
supported_restrictions=scope_definition.get('subscopes', []),
is_required=scope_definition.get('required', False))
class ScopeSelectionMenu():
class ScopeSelectionMenu(object):
"""A text menu which prompts the user to select the scopes to authorize."""
class MenuChoiceError(Exception):
@@ -13122,7 +13125,6 @@ Append an 'r' to grant read-only access or an 'a' to grant action-only access.
if selected is None:
# Toggle the option on/off
option.is_selected = not option.is_selected
option.unrestrict()
else:
option.is_selected = selected
else:
@@ -14007,9 +14009,9 @@ def ProcessGAMCommand(args):
systemErrorExit(2, '%s is not a valid argument for "gam <users> watch"' % watchWhat)
else:
systemErrorExit(2, '%s is not a valid argument for "gam"' % command)
#except IndexError:
# showUsage()
# sys.exit(2)
except IndexError:
showUsage()
sys.exit(2)
except KeyboardInterrupt:
sys.exit(50)
except socket.error as e:

View File

@@ -0,0 +1,9 @@
dpkg --add-architecture i386
apt update
apt install -y python:i386
python -V
pip install --upgrade pip
pip freeze > requirements.txt
pip install --upgrade -r requirements.txt
rm requirements.txt
pip install pyinstaller

View File

@@ -0,0 +1 @@
linux-x86_64-install.sh

View File

@@ -0,0 +1,11 @@
sudo apt update
sudo apt -y dist-upgrade
sudo sh -c "echo 'foreign-architecture i386' > /etc/dpkg/dpkg.cfg.d/multiarch"
sudo apt update
sudo apt install -y python:i386 python2.7:i386 python2.7-minimal:i386 mime-support:i386
python -V
sudo pip install --upgrade pip
sudo pip freeze > requirements.txt
sudo pip install --upgrade -r requirements.txt
sudo rm requirements.txt
sudo pip install pyinstaller

View File

@@ -0,0 +1 @@
linux-x86_64-install.sh

View File

@@ -0,0 +1,5 @@
pip install --upgrade pip
pip freeze > requirements.txt
pip install --upgrade -r requirements.txt
rm requirements.txt
pip install pyinstaller

View File

@@ -0,0 +1,9 @@
cd src
pyinstaller --clean -F --distpath=gam $GAMOS-gam.spec
gam/gam version
export GAMVERSION=`gam/gam version simple`
cp LICENSE gam
cp whatsnew.txt gam
cp GamCommands.txt gam
GAM_ARCHIVE=gam-$GAMVERSION-$GAMOS-$PLATFORM.tar.xz
tar cfJ $GAM_ARCHIVE gam/

View File

@@ -0,0 +1,7 @@
brew update
brew install python@2
pip install --upgrade pip
pip freeze > requirements.txt
pip install --upgrade -r requirements.txt
rm requirements.txt
pip install pyinstaller

View File

@@ -0,0 +1 @@
linux-x86_64-install.sh

View File

@@ -0,0 +1,9 @@
brew update
brew install python@2 || true
brew link --overwrite python@2
sudo pip install --upgrade pip
sudo pip freeze > requirements.txt
sudo pip install --upgrade -r requirements.txt
sudo rm requirements.txt
sudo pip install --upgrade altgraph
sudo pip install pyinstaller

View File

@@ -0,0 +1 @@
linux-x86_64-install.sh

View File

@@ -0,0 +1,9 @@
powershell Install-WindowsFeature Net-Framework-Core
cinst -y --forcex86 python2
export PATH=$PATH:/c/Python27/scripts
cinst -y wixtoolset
pip install --upgrade pip
pip freeze > requirements.txt
pip install --upgrade -r requirements.txt
rm requirements.txt
pip install pyinstaller

View File

@@ -0,0 +1,15 @@
cd src
pyinstaller --clean -F --distpath=gam $GAMOS-gam.spec
gam/gam version
export GAMVERSION=`gam/gam version simple`
cp LICENSE gam
cp GamCommands.txt gam
cp whatsnew.txt gam
cp gam-setup.bat gam
GAM_ARCHIVE=gam-$GAMVERSION-$GAMOS-$PLATFORM.zip
/c/Program\ Files/7-Zip/7z.exe a -tzip $GAM_ARCHIVE gam -xr!.svn
mkdir gam-64
cp -rf gam/* gam-64/;
/c/Program\ Files\ \(x86\)/WiX\ Toolset\ v3.11/bin/candle.exe -arch x86 gam.wxs
/c/Program\ Files\ \(x86\)/WiX\ Toolset\ v3.11/bin/light.exe -ext /c/Program\ Files\ \(x86\)/WiX\ Toolset\ v3.11/bin/WixUIExtension.dll gam.wixobj -o gam-$GAMVERSION-$GAMOS-$PLATFORM.msi || true;
rm *.wixpdb

View File

@@ -0,0 +1,9 @@
powershell Install-WindowsFeature Net-Framework-Core
cinst -y $CINST_ARGS python2
export PATH=$PATH:/c/Python27/scripts
cinst -y wixtoolset
pip install --upgrade pip
pip freeze > requirements.txt
pip install --upgrade -r requirements.txt
rm requirements.txt
pip install pyinstaller

View File

@@ -0,0 +1,15 @@
cd src
pyinstaller --clean -F --distpath=gam $GAMOS-gam.spec
gam/gam version
export GAMVERSION=`gam/gam version simple`
cp LICENSE gam
cp GamCommands.txt gam
cp whatsnew.txt gam
cp gam-setup.bat gam
GAM_ARCHIVE=gam-$GAMVERSION-$GAMOS-$PLATFORM.zip
/c/Program\ Files/7-Zip/7z.exe a -tzip $GAM_ARCHIVE gam -xr!.svn
mkdir gam-64
cp -rf gam/* gam-64/;
/c/Program\ Files\ \(x86\)/WiX\ Toolset\ v3.11/bin/candle.exe -arch x64 gam.wxs
/c/Program\ Files\ \(x86\)/WiX\ Toolset\ v3.11/bin/light.exe -ext /c/Program\ Files\ \(x86\)/WiX\ Toolset\ v3.11/bin/WixUIExtension.dll gam.wixobj -o gam-$GAMVERSION-$GAMOS-$PLATFORM.msi || true;
rm *.wixpdb

View File

@@ -4,7 +4,7 @@ import platform
import re
gam_author = u'Jay Lee <jay0lee@gmail.com>'
gam_version = u'4.70'
gam_version = u'4.71'
gam_license = u'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
GAM_URL = u'https://git.io/gam'