mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-05 14:51:39 +00:00
Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
92b8ea6dcd | ||
|
|
1654dee62e | ||
|
|
2316b9e76a | ||
|
|
b095b361cb | ||
|
|
fe7c72beac | ||
|
|
9930209980 | ||
|
|
48553f4ad9 | ||
|
|
a7bb600bf5 | ||
|
|
57938b19a8 | ||
|
|
8d485f4f74 | ||
|
|
8db6d1f4f7 | ||
|
|
6198f7ace3 | ||
|
|
9472fb2a4c | ||
|
|
8fdc49a0af | ||
|
|
639cede6c4 | ||
|
|
65fd49e377 | ||
|
|
4e141bf764 | ||
|
|
2db40e841b | ||
|
|
1f728ff4da | ||
|
|
4c43b28820 |
47
.travis.yml
47
.travis.yml
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
22
src/gam.py
22
src/gam.py
@@ -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:
|
||||
|
||||
9
src/travis/linux-i686-precise-testing-before-install.sh
Normal file
9
src/travis/linux-i686-precise-testing-before-install.sh
Normal 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
|
||||
1
src/travis/linux-i686-precise-testing-install.sh
Symbolic link
1
src/travis/linux-i686-precise-testing-install.sh
Symbolic link
@@ -0,0 +1 @@
|
||||
linux-x86_64-install.sh
|
||||
11
src/travis/linux-x86-before-install.sh
Normal file
11
src/travis/linux-x86-before-install.sh
Normal 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
|
||||
1
src/travis/linux-x86-install.sh
Symbolic link
1
src/travis/linux-x86-install.sh
Symbolic link
@@ -0,0 +1 @@
|
||||
linux-x86_64-install.sh
|
||||
5
src/travis/linux-x86_64-before-install.sh
Normal file
5
src/travis/linux-x86_64-before-install.sh
Normal 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
|
||||
9
src/travis/linux-x86_64-install.sh
Normal file
9
src/travis/linux-x86_64-install.sh
Normal 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/
|
||||
7
src/travis/osx-x86_64-before-install.sh
Normal file
7
src/travis/osx-x86_64-before-install.sh
Normal 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
|
||||
1
src/travis/osx-x86_64-install.sh
Symbolic link
1
src/travis/osx-x86_64-install.sh
Symbolic link
@@ -0,0 +1 @@
|
||||
linux-x86_64-install.sh
|
||||
9
src/travis/osx-x86_64-sierra-testing-before-install.sh
Normal file
9
src/travis/osx-x86_64-sierra-testing-before-install.sh
Normal 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
|
||||
1
src/travis/osx-x86_64-sierra-testing-install.sh
Symbolic link
1
src/travis/osx-x86_64-sierra-testing-install.sh
Symbolic link
@@ -0,0 +1 @@
|
||||
linux-x86_64-install.sh
|
||||
9
src/travis/windows-x86-before-install.sh
Normal file
9
src/travis/windows-x86-before-install.sh
Normal 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
|
||||
15
src/travis/windows-x86-install.sh
Normal file
15
src/travis/windows-x86-install.sh
Normal 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
|
||||
9
src/travis/windows-x86_64-before-install.sh
Normal file
9
src/travis/windows-x86_64-before-install.sh
Normal 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
|
||||
15
src/travis/windows-x86_64-install.sh
Normal file
15
src/travis/windows-x86_64-install.sh
Normal 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
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user