chef_fixie 0.4.0 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -5
- data/bin/chef_fixie +1 -1
- data/doc/BulkFixup.md +1 -1
- data/lib/chef_fixie/authz_mapper.rb +26 -28
- data/lib/chef_fixie/authz_objects.rb +44 -41
- data/lib/chef_fixie/bulk_edit_permissions.rb +24 -20
- data/lib/chef_fixie/check_org_associations.rb +40 -39
- data/lib/chef_fixie/config.rb +20 -19
- data/lib/chef_fixie/console.rb +9 -9
- data/lib/chef_fixie/context.rb +2 -4
- data/lib/chef_fixie/sql.rb +12 -12
- data/lib/chef_fixie/sql_objects.rb +44 -37
- data/lib/chef_fixie/utility_helpers.rb +13 -9
- data/lib/chef_fixie/version.rb +1 -1
- data/lib/chef_fixie.rb +7 -7
- data/spec/chef_fixie/acl_spec.rb +23 -25
- data/spec/chef_fixie/assoc_invite_spec.rb +5 -8
- data/spec/chef_fixie/check_org_associations_spec.rb +14 -17
- data/spec/chef_fixie/groups_spec.rb +7 -11
- data/spec/chef_fixie/org_spec.rb +4 -5
- data/spec/chef_fixie/orgs_spec.rb +6 -9
- data/spec/spec_helper.rb +5 -6
- metadata +19 -62
@@ -1,11 +1,11 @@
|
|
1
1
|
|
2
|
-
require
|
2
|
+
require "rspec"
|
3
3
|
require "spec_helper"
|
4
|
-
require
|
5
|
-
require
|
4
|
+
require "chef_fixie"
|
5
|
+
require "chef_fixie/config"
|
6
6
|
|
7
7
|
RSpec.describe ChefFixie::Sql::Orgs, "Organizations access" do
|
8
|
-
let (:test_org) { "ponyville"}
|
8
|
+
let (:test_org) { "ponyville" }
|
9
9
|
|
10
10
|
context "Basic access to orgs" do
|
11
11
|
let (:orgs) { ChefFixie::Sql::Orgs.new }
|
@@ -15,7 +15,7 @@ RSpec.describe ChefFixie::Sql::Orgs, "Organizations access" do
|
|
15
15
|
|
16
16
|
it "We can list orgs" do
|
17
17
|
# array matcher requires a splat. (I didn't know this )
|
18
|
-
expect(orgs.list).to include( * %w
|
18
|
+
expect(orgs.list).to include( * %w{acme ponyville wonderbolts} )
|
19
19
|
end
|
20
20
|
it "We can list orgs with a limit" do
|
21
21
|
# array matcher requires a splat. (I didn't know this )
|
@@ -38,7 +38,7 @@ RSpec.describe ChefFixie::Sql::Orgs, "Organizations access" do
|
|
38
38
|
end
|
39
39
|
|
40
40
|
# TODO: Automatically extract this from the filter by field
|
41
|
-
%w
|
41
|
+
%w{name, id, full_name, authz_id}.each do |accessor|
|
42
42
|
it "We can access an org by #{accessor}" do
|
43
43
|
expect(orgs.by_name(test_org).all.count).to eq(1)
|
44
44
|
expect(orgs.by_name(test_org).all.first.name).to eq(the_org.name)
|
@@ -47,7 +47,4 @@ RSpec.describe ChefFixie::Sql::Orgs, "Organizations access" do
|
|
47
47
|
|
48
48
|
end
|
49
49
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
50
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
# loaded once.
|
5
5
|
#
|
6
6
|
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
7
|
-
require
|
7
|
+
require "chef_fixie/config"
|
8
8
|
|
9
9
|
def load_from_config_example
|
10
10
|
# load from config file
|
@@ -13,7 +13,7 @@ def load_from_config_example
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def load_from_opscode
|
16
|
-
ChefFixie::Config
|
16
|
+
ChefFixie::Config.instance.load_from_pc
|
17
17
|
end
|
18
18
|
|
19
19
|
RSpec.configure do |config|
|
@@ -24,7 +24,7 @@ RSpec.configure do |config|
|
|
24
24
|
# order dependency and want to debug it, you can fix the order by providing
|
25
25
|
# the seed, which is printed after each run.
|
26
26
|
# --seed 1234
|
27
|
-
config.order =
|
27
|
+
config.order = "random"
|
28
28
|
|
29
29
|
# configure specs
|
30
30
|
|
@@ -35,7 +35,6 @@ RSpec.configure do |config|
|
|
35
35
|
# Horrible shameful hack TODO FIXME
|
36
36
|
# We can't include a lot of the SQL code until we configure things, because
|
37
37
|
# we inherit from Model e.g.
|
38
|
-
# class Users < Sequel::Model(:users)
|
39
|
-
require
|
38
|
+
# class Users < Sequel::Model(:users)
|
39
|
+
require "chef_fixie"
|
40
40
|
end
|
41
|
-
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef_fixie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Anderson
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '16'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: '16'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: ffi-yajl
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,46 +44,46 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '1.2'
|
48
48
|
- - ">="
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version:
|
50
|
+
version: 1.2.3
|
51
51
|
type: :runtime
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
55
|
- - "~>"
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version: '
|
57
|
+
version: '1.2'
|
58
58
|
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version:
|
60
|
+
version: 1.2.3
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: pry
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: 0.
|
67
|
+
version: '0.13'
|
68
68
|
type: :runtime
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: 0.
|
74
|
+
version: '0.13'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: sequel
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
|
-
- - "
|
79
|
+
- - ">="
|
80
80
|
- !ruby/object:Gem::Version
|
81
81
|
version: '4.11'
|
82
82
|
type: :runtime
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
|
-
- - "
|
86
|
+
- - ">="
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '4.11'
|
89
89
|
- !ruby/object:Gem::Dependency
|
@@ -120,49 +120,7 @@ dependencies:
|
|
120
120
|
- - ">="
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '0'
|
123
|
-
|
124
|
-
name: bundler
|
125
|
-
requirement: !ruby/object:Gem::Requirement
|
126
|
-
requirements:
|
127
|
-
- - "~>"
|
128
|
-
- !ruby/object:Gem::Version
|
129
|
-
version: '1.3'
|
130
|
-
type: :development
|
131
|
-
prerelease: false
|
132
|
-
version_requirements: !ruby/object:Gem::Requirement
|
133
|
-
requirements:
|
134
|
-
- - "~>"
|
135
|
-
- !ruby/object:Gem::Version
|
136
|
-
version: '1.3'
|
137
|
-
- !ruby/object:Gem::Dependency
|
138
|
-
name: rake
|
139
|
-
requirement: !ruby/object:Gem::Requirement
|
140
|
-
requirements:
|
141
|
-
- - "~>"
|
142
|
-
- !ruby/object:Gem::Version
|
143
|
-
version: '0'
|
144
|
-
type: :development
|
145
|
-
prerelease: false
|
146
|
-
version_requirements: !ruby/object:Gem::Requirement
|
147
|
-
requirements:
|
148
|
-
- - "~>"
|
149
|
-
- !ruby/object:Gem::Version
|
150
|
-
version: '0'
|
151
|
-
- !ruby/object:Gem::Dependency
|
152
|
-
name: rspec
|
153
|
-
requirement: !ruby/object:Gem::Requirement
|
154
|
-
requirements:
|
155
|
-
- - "~>"
|
156
|
-
- !ruby/object:Gem::Version
|
157
|
-
version: '0'
|
158
|
-
type: :development
|
159
|
-
prerelease: false
|
160
|
-
version_requirements: !ruby/object:Gem::Requirement
|
161
|
-
requirements:
|
162
|
-
- - "~>"
|
163
|
-
- !ruby/object:Gem::Version
|
164
|
-
version: '0'
|
165
|
-
description: Low level manipulation tool for Chef Server 12 and later
|
123
|
+
description: Low level manipulation tool for Chef Infra Server
|
166
124
|
email:
|
167
125
|
- mark@chef.io
|
168
126
|
executables:
|
@@ -199,9 +157,9 @@ files:
|
|
199
157
|
- spec/spec_helper.rb
|
200
158
|
homepage: https://github.com/chef/fixie
|
201
159
|
licenses:
|
202
|
-
-
|
160
|
+
- Apache-2.0
|
203
161
|
metadata: {}
|
204
|
-
post_install_message:
|
162
|
+
post_install_message:
|
205
163
|
rdoc_options: []
|
206
164
|
require_paths:
|
207
165
|
- lib
|
@@ -216,11 +174,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
216
174
|
- !ruby/object:Gem::Version
|
217
175
|
version: '0'
|
218
176
|
requirements: []
|
219
|
-
|
220
|
-
|
221
|
-
signing_key:
|
177
|
+
rubygems_version: 3.2.22
|
178
|
+
signing_key:
|
222
179
|
specification_version: 4
|
223
|
-
summary: Low level manipulation tool for Chef Server
|
180
|
+
summary: Low level manipulation tool for Chef Infra Server
|
224
181
|
test_files:
|
225
182
|
- spec/chef_fixie/acl_spec.rb
|
226
183
|
- spec/chef_fixie/assoc_invite_spec.rb
|