josef 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ada1f2866aa63a291d4ba5146c05644e012a6b5294d296af30a49d608d6906f7
4
- data.tar.gz: 4a82a8fd15a250d4e6563bf4184be273116cd3c54d87ebbf60ee1e4ca11ae419
3
+ metadata.gz: ba78463eb815ba40ed06e5505c8bc5ddd3b18407880f452ba20cdf231a5a6e85
4
+ data.tar.gz: f0bd467fc26c7274f8d378665f84eef639048929da986d8b241bc01e02d8d12a
5
5
  SHA512:
6
- metadata.gz: 570e4d9ae534b519d049633400210b5733c1e5e31bd2f56a1b371114db248733813ab0f24f75b08308b64e8cb245e127bb8e0162033b219d0a4035ec63a4e3a0
7
- data.tar.gz: 6c0b6b75744f6013fb534c4929b4e9e4976da3e8c41fbcff4e2fcbe4ec9cb92f8bc7262b14fbb751d3e2be7cdd6bf4d024b09e3d1545879e7bf1cfe85bd14926
6
+ metadata.gz: aadf588bbba19d761dd674dc29d889d8e2ea6cedff08fc47d40c34d51364b88fb6c1d17036d3182c4610696341768cafd661fabc1e2d9dd89bc534fc12643dbd
7
+ data.tar.gz: 80e6aa5ea05235d6b92a269c018809e94e0a42b58b04f8705fa762a963668a74ad0f968a3ae4b45f9042115c6a541eee4d00f9653d8f925ea41121fb9595a4d1
@@ -0,0 +1,21 @@
1
+ name: test
2
+
3
+ on:
4
+ pull_request:
5
+
6
+ jobs:
7
+ test:
8
+ name: test
9
+ runs-on: ubuntu-latest
10
+ container:
11
+ image: ruby:3.0.0
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - name: setup
15
+ run: |
16
+ gem install bundler
17
+ bundle config set path 'vendor/bundle'
18
+ bundle install --quiet
19
+ git checkout .
20
+ - name: test
21
+ run: bundle exec rake spec
data/.gitignore CHANGED
@@ -12,5 +12,5 @@
12
12
 
13
13
  vendor/bundle
14
14
  .env
15
- *.json
16
- *.yml
15
+ credentials/*.json
16
+ /*.yml
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- josef (0.3.0)
4
+ josef (0.4.0)
5
5
  activesupport
6
6
  google-api-client
7
7
  thor
data/README.md CHANGED
@@ -58,7 +58,7 @@ exclued_groups:
58
58
  ```
59
59
 
60
60
  ```sh
61
- josef apply ./local_group_file.yml --exculude ./excluded_groups.yml
61
+ josef apply ./local_group_file.yml --exclude ./excluded_groups.yml
62
62
  ```
63
63
 
64
64
  ## Development
data/lib/josef/diff.rb CHANGED
@@ -13,7 +13,6 @@ module Josef
13
13
 
14
14
  def changed?(local_group)
15
15
  remote_group = remote.find{|g| g[:group_mail_address] == local_group[:group_mail_address]}
16
- return false if local_group[:members].nil? || remote_group[:members].nil?
17
16
  return false if local_group[:members].sort == remote_group[:members].sort
18
17
 
19
18
  true
@@ -17,7 +17,7 @@ module Josef
17
17
  members.concat(res.members)
18
18
  end
19
19
 
20
- members
20
+ members || []
21
21
  end
22
22
 
23
23
  def add_member(group_mail_address, member_mail_address)
data/lib/josef/local.rb CHANGED
@@ -10,7 +10,12 @@ module Josef
10
10
  def local!(local_file)
11
11
  return [] if local_file.nil?
12
12
 
13
- YAML.load_file(local_file).map{|h| h.deep_symbolize_keys}
13
+ local_groups = YAML.load_file(local_file).map{|h| h.deep_symbolize_keys}
14
+ local_groups.each do | group |
15
+ group[:members] = [] if group[:members].nil?
16
+ end
17
+
18
+ local_groups
14
19
  end
15
20
 
16
21
  def exculued?(group_mail_address)
data/lib/josef/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Josef
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: josef
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - jolantern
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-23 00:00:00.000000000 Z
11
+ date: 2021-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-api-client
@@ -61,6 +61,7 @@ extensions: []
61
61
  extra_rdoc_files: []
62
62
  files:
63
63
  - ".editorconfig"
64
+ - ".github/workflows/test.yml"
64
65
  - ".gitignore"
65
66
  - ".rspec"
66
67
  - Gemfile
@@ -91,7 +92,7 @@ metadata:
91
92
  homepage_uri: https://github.com/j-o-lantern0422/josef
92
93
  source_code_uri: https://github.com/j-o-lantern0422/josef
93
94
  changelog_uri: https://github.com/j-o-lantern0422/josef
94
- post_install_message:
95
+ post_install_message:
95
96
  rdoc_options: []
96
97
  require_paths:
97
98
  - lib
@@ -106,8 +107,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
107
  - !ruby/object:Gem::Version
107
108
  version: '0'
108
109
  requirements: []
109
- rubygems_version: 3.1.2
110
- signing_key:
110
+ rubygems_version: 3.2.3
111
+ signing_key:
111
112
  specification_version: 4
112
113
  summary: josef is management google workspace mailing list command
113
114
  test_files: []