pe-razor-client 0.14.0 → 0.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/NEWS.md +25 -0
- data/bin/razor +9 -4
- data/lib/razor/cli.rb +10 -0
- data/lib/razor/cli/document.rb +59 -0
- data/lib/razor/cli/format.rb +81 -20
- data/lib/razor/cli/navigate.rb +121 -27
- data/lib/razor/cli/parse.rb +83 -10
- data/lib/razor/cli/transforms.rb +42 -0
- data/lib/razor/cli/version.rb +46 -0
- data/lib/razor/cli/views.rb +25 -0
- data/lib/razor/cli/views.yaml +196 -0
- data/spec/cli/format_spec.rb +99 -0
- data/spec/cli/navigate_spec.rb +111 -2
- data/spec/cli/parse_spec.rb +20 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/argument_formatting/should_allow_spaces.yml +966 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_--help_command_.yml +99 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_-h_command_.yml +99 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_command_--help_.yml +99 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_command_-h_.yml +99 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_command_help_.yml +99 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_help_command_.yml +99 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_authentication/should_preserve_that_across_navigation.yml +9 -42
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_authentication/should_supply_that_to_the_API_service.yml +5 -5
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_invalid_parameter/should_fail_with_bad_JSON.yml +228 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_invalid_parameter/should_fail_with_malformed_argument.yml +120 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_array/should_merge_an_array_into_an_existing_array.yml +2006 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_array/should_merge_the_arguments_as_an_array.yml +2006 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_array/should_merge_the_arguments_into_an_existing_array.yml +2006 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_object/should_construct_a_json_object.yml +234 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_object/should_construct_a_json_object_with_unicode.yml +412 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_object/should_fail_with_mixed_types_array_then_hash_.yml +228 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_object/should_fail_with_mixed_types_hash_then_array_.yml +164 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_no_parameters/should_fail_with_bad_JSON.yml +36 -0
- data/spec/fixtures/vcr/Razor_CLI_Parse/_new/_help/should_print_a_list_of_known_endpoints.yml +5 -5
- data/spec/spec_helper.rb +12 -1
- data/spec/testing.md +16 -0
- data/spec/version_spec.rb +8 -0
- metadata +67 -60
- data/.gitignore +0 -7
- data/.yardopts +0 -2
- data/Gemfile +0 -35
- data/Gemfile.lock +0 -53
- data/Rakefile +0 -37
- data/lib/razor/cli/navigate.yaml +0 -28
- data/pe-razor-client.gemspec +0 -32
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_a_single_item_path/.yml +0 -69
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_an_invalid_path/.yml +0 -36
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_no_path/.yml +0 -36
- data/spec/fixtures/vcr/Razor_CLI_Parse/_new/_help/.yml +0 -36
data/spec/spec_helper.rb
CHANGED
@@ -26,6 +26,12 @@ VCR.configure do |c|
|
|
26
26
|
:record => vcr_record_mode
|
27
27
|
}
|
28
28
|
end
|
29
|
+
def reset_db
|
30
|
+
razor_admin_path = ENV['razor-admin'] || 'bin/razor-admin'
|
31
|
+
db_environment = ENV['server-database-environment'] || 'development'
|
32
|
+
# The `cd` business is a workaround, since running `razor-admin` from a different directory currently fails.
|
33
|
+
system("cd ../razor-server && #{razor_admin_path} -e #{db_environment} reset-database")
|
34
|
+
end
|
29
35
|
|
30
36
|
# Record one cassette for each test
|
31
37
|
RSpec.configure do |c|
|
@@ -33,4 +39,9 @@ RSpec.configure do |c|
|
|
33
39
|
c.before(:each) do
|
34
40
|
ENV::delete('RAZOR_API')
|
35
41
|
end
|
36
|
-
|
42
|
+
# Make tests have no side effects when [re-]recording.
|
43
|
+
if vcr_recording?
|
44
|
+
c.before(:all) { reset_db }
|
45
|
+
c.after(:each) { reset_db }
|
46
|
+
end
|
47
|
+
end
|
data/spec/testing.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
For developers:
|
2
|
+
|
3
|
+
Client-side spec tests use a framework called VCR for testing the client independent of the server. VCR fakes the
|
4
|
+
interactions from the server so the client can continue executing its code. It does this by copying the exact
|
5
|
+
expected input, then replying with the response provided by the server when the test is executed in a "record" mode.
|
6
|
+
|
7
|
+
When writing these tests, keep in mind that other developers may need to rerecord tests. This can occur if a
|
8
|
+
request to the server is somehow different, or if the client needs to issue a new request to the server.
|
9
|
+
|
10
|
+
Here are some suggestions to make rerecording easier:
|
11
|
+
|
12
|
+
- If a request has external dependencies, set up the dependencies as part of (or before) the test.
|
13
|
+
- For example, let's say you're testing the `create-policy` command. Execution of that command requires several
|
14
|
+
objects be present in the database: brokers, repos, etc. The only way to issue the `create-policy` command
|
15
|
+
successfully on the client is to issue `create-broker`, `create-repo`, etc. beforehand. These extra commands
|
16
|
+
should be part of the test.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pe-razor-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet Labs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mime-types
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: rest-client
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - <
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '1.7'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - <
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '1.7'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: terminal-table
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,71 +66,63 @@ dependencies:
|
|
66
66
|
- - '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ~>
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '1.3'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rake
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - '>='
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - '>='
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
|
-
description: The client for the Razor server
|
98
|
-
email:
|
99
|
-
- info@puppetlabs.com
|
69
|
+
description: |
|
70
|
+
Razor is an advanced provisioning application which can deploy both bare-metal
|
71
|
+
and virtual systems. It's aimed at solving the problem of how to bring new
|
72
|
+
metal into a state where your existing DevOps/configuration management
|
73
|
+
workflows can take it over.
|
74
|
+
|
75
|
+
This provides the client application gem, used to provide CLI access and control
|
76
|
+
to users of razor-server.
|
77
|
+
email: info@puppetlabs.com
|
100
78
|
executables:
|
101
79
|
- razor
|
102
80
|
extensions: []
|
103
81
|
extra_rdoc_files: []
|
104
82
|
files:
|
105
|
-
- .gitignore
|
106
|
-
- .yardopts
|
107
|
-
- Gemfile
|
108
|
-
- Gemfile.lock
|
109
|
-
- LICENSE
|
110
|
-
- README.md
|
111
|
-
- Rakefile
|
112
83
|
- bin/razor
|
113
|
-
- lib/razor.rb
|
114
84
|
- lib/razor/cli.rb
|
85
|
+
- lib/razor/cli/document.rb
|
115
86
|
- lib/razor/cli/format.rb
|
116
87
|
- lib/razor/cli/navigate.rb
|
117
|
-
- lib/razor/cli/navigate.yaml
|
118
88
|
- lib/razor/cli/parse.rb
|
119
|
-
-
|
89
|
+
- lib/razor/cli/transforms.rb
|
90
|
+
- lib/razor/cli/version.rb
|
91
|
+
- lib/razor/cli/views.rb
|
92
|
+
- lib/razor/cli/views.yaml
|
93
|
+
- lib/razor.rb
|
94
|
+
- NEWS.md
|
95
|
+
- README.md
|
96
|
+
- LICENSE
|
97
|
+
- spec/cli/format_spec.rb
|
120
98
|
- spec/cli/navigate_spec.rb
|
121
99
|
- spec/cli/parse_spec.rb
|
122
|
-
- spec/fixtures/vcr/Razor_CLI_Navigate/
|
123
|
-
- spec/fixtures/vcr/Razor_CLI_Navigate/
|
100
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/argument_formatting/should_allow_spaces.yml
|
101
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_--help_command_.yml
|
102
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_-h_command_.yml
|
103
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_command_--help_.yml
|
104
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_command_-h_.yml
|
105
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_command_help_.yml
|
106
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_help_command_.yml
|
124
107
|
- spec/fixtures/vcr/Razor_CLI_Navigate/with_authentication/should_preserve_that_across_navigation.yml
|
125
108
|
- spec/fixtures/vcr/Razor_CLI_Navigate/with_authentication/should_supply_that_to_the_API_service.yml
|
126
|
-
- spec/fixtures/vcr/Razor_CLI_Navigate/
|
127
|
-
- spec/fixtures/vcr/
|
109
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/with_invalid_parameter/should_fail_with_bad_JSON.yml
|
110
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/with_invalid_parameter/should_fail_with_malformed_argument.yml
|
111
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_array/should_merge_an_array_into_an_existing_array.yml
|
112
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_array/should_merge_the_arguments_as_an_array.yml
|
113
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_array/should_merge_the_arguments_into_an_existing_array.yml
|
114
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_object/should_construct_a_json_object.yml
|
115
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_object/should_construct_a_json_object_with_unicode.yml
|
116
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_object/should_fail_with_mixed_types_array_then_hash_.yml
|
117
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_object/should_fail_with_mixed_types_hash_then_array_.yml
|
118
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/with_no_parameters/should_fail_with_bad_JSON.yml
|
128
119
|
- spec/fixtures/vcr/Razor_CLI_Parse/_new/_help/should_print_a_list_of_known_endpoints.yml
|
129
120
|
- spec/spec_helper.rb
|
121
|
+
- spec/testing.md
|
130
122
|
- spec/vcr_library.rb
|
131
|
-
|
132
|
-
|
133
|
-
|
123
|
+
- spec/version_spec.rb
|
124
|
+
homepage: http://puppetlabs.com/puppet/puppet-enterprise
|
125
|
+
licenses: []
|
134
126
|
metadata: {}
|
135
127
|
post_install_message:
|
136
128
|
rdoc_options: []
|
@@ -151,17 +143,32 @@ rubyforge_project:
|
|
151
143
|
rubygems_version: 2.0.3
|
152
144
|
signing_key:
|
153
145
|
specification_version: 4
|
154
|
-
summary:
|
146
|
+
summary: Razor is an advanced provisioning application
|
155
147
|
test_files:
|
148
|
+
- spec/cli/format_spec.rb
|
156
149
|
- spec/cli/navigate_spec.rb
|
157
150
|
- spec/cli/parse_spec.rb
|
158
|
-
- spec/fixtures/vcr/Razor_CLI_Navigate/
|
159
|
-
- spec/fixtures/vcr/Razor_CLI_Navigate/
|
151
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/argument_formatting/should_allow_spaces.yml
|
152
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_--help_command_.yml
|
153
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_-h_command_.yml
|
154
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_command_--help_.yml
|
155
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_command_-h_.yml
|
156
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_command_help_.yml
|
157
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_help_command_.yml
|
160
158
|
- spec/fixtures/vcr/Razor_CLI_Navigate/with_authentication/should_preserve_that_across_navigation.yml
|
161
159
|
- spec/fixtures/vcr/Razor_CLI_Navigate/with_authentication/should_supply_that_to_the_API_service.yml
|
162
|
-
- spec/fixtures/vcr/Razor_CLI_Navigate/
|
163
|
-
- spec/fixtures/vcr/
|
160
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/with_invalid_parameter/should_fail_with_bad_JSON.yml
|
161
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/with_invalid_parameter/should_fail_with_malformed_argument.yml
|
162
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_array/should_merge_an_array_into_an_existing_array.yml
|
163
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_array/should_merge_the_arguments_as_an_array.yml
|
164
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_array/should_merge_the_arguments_into_an_existing_array.yml
|
165
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_object/should_construct_a_json_object.yml
|
166
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_object/should_construct_a_json_object_with_unicode.yml
|
167
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_object/should_fail_with_mixed_types_array_then_hash_.yml
|
168
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_object/should_fail_with_mixed_types_hash_then_array_.yml
|
169
|
+
- spec/fixtures/vcr/Razor_CLI_Navigate/with_no_parameters/should_fail_with_bad_JSON.yml
|
164
170
|
- spec/fixtures/vcr/Razor_CLI_Parse/_new/_help/should_print_a_list_of_known_endpoints.yml
|
165
171
|
- spec/spec_helper.rb
|
172
|
+
- spec/testing.md
|
166
173
|
- spec/vcr_library.rb
|
167
|
-
|
174
|
+
- spec/version_spec.rb
|
data/.gitignore
DELETED
data/.yardopts
DELETED
data/Gemfile
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# mime-types is a dependency of rest-client. We need to explicitly depend
|
4
|
-
# on it and pin its version to make sure this works with Ruby 1.8.7
|
5
|
-
gem 'mime-types', '< 2.0'
|
6
|
-
gem 'rest-client'
|
7
|
-
gem 'terminal-table'
|
8
|
-
|
9
|
-
group :doc do
|
10
|
-
gem 'yard'
|
11
|
-
gem 'kramdown'
|
12
|
-
end
|
13
|
-
|
14
|
-
# This group will be excluded by default in `torquebox archive`
|
15
|
-
group :test do
|
16
|
-
gem 'rack-test'
|
17
|
-
gem 'rspec', '~> 2.13.0'
|
18
|
-
gem 'rspec-core', '~> 2.13.1'
|
19
|
-
gem 'rspec-expectations', '~> 2.13.0'
|
20
|
-
gem 'rspec-mocks', '~> 2.13.1'
|
21
|
-
gem 'simplecov'
|
22
|
-
gem 'webmock'
|
23
|
-
gem 'vcr'
|
24
|
-
end
|
25
|
-
|
26
|
-
group :development do
|
27
|
-
gem 'rake'
|
28
|
-
end
|
29
|
-
|
30
|
-
# This allows you to create `Gemfile.local` and have it loaded automatically;
|
31
|
-
# the purpose of this is to allow you to put additional development gems
|
32
|
-
# somewhere convenient without having to constantly mess with this file.
|
33
|
-
#
|
34
|
-
# Gemfile.local is in the .gitignore file; do not check one in!
|
35
|
-
eval(File.read(File.dirname(__FILE__) + '/Gemfile.local'), binding) rescue nil
|
data/Gemfile.lock
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: https://rubygems.org/
|
3
|
-
specs:
|
4
|
-
addressable (2.3.3)
|
5
|
-
crack (0.3.2)
|
6
|
-
diff-lcs (1.2.4)
|
7
|
-
kramdown (1.1.0)
|
8
|
-
mime-types (1.24)
|
9
|
-
multi_json (1.7.9)
|
10
|
-
rack (1.5.2)
|
11
|
-
rack-test (0.6.2)
|
12
|
-
rack (>= 1.0)
|
13
|
-
rake (10.1.0)
|
14
|
-
rest-client (1.6.7)
|
15
|
-
mime-types (>= 1.16)
|
16
|
-
rspec (2.13.0)
|
17
|
-
rspec-core (~> 2.13.0)
|
18
|
-
rspec-expectations (~> 2.13.0)
|
19
|
-
rspec-mocks (~> 2.13.0)
|
20
|
-
rspec-core (2.13.1)
|
21
|
-
rspec-expectations (2.13.0)
|
22
|
-
diff-lcs (>= 1.1.3, < 2.0)
|
23
|
-
rspec-mocks (2.13.1)
|
24
|
-
simplecov (0.7.1)
|
25
|
-
multi_json (~> 1.0)
|
26
|
-
simplecov-html (~> 0.7.1)
|
27
|
-
simplecov-html (0.7.1)
|
28
|
-
terminal-table (1.4.5)
|
29
|
-
vcr (2.5.0)
|
30
|
-
webmock (1.9.3)
|
31
|
-
addressable (>= 2.2.7)
|
32
|
-
crack (>= 0.3.2)
|
33
|
-
yard (0.8.7)
|
34
|
-
|
35
|
-
PLATFORMS
|
36
|
-
java
|
37
|
-
ruby
|
38
|
-
|
39
|
-
DEPENDENCIES
|
40
|
-
kramdown
|
41
|
-
mime-types (< 2.0)
|
42
|
-
rack-test
|
43
|
-
rake
|
44
|
-
rest-client
|
45
|
-
rspec (~> 2.13.0)
|
46
|
-
rspec-core (~> 2.13.1)
|
47
|
-
rspec-expectations (~> 2.13.0)
|
48
|
-
rspec-mocks (~> 2.13.1)
|
49
|
-
simplecov
|
50
|
-
terminal-table
|
51
|
-
vcr
|
52
|
-
webmock
|
53
|
-
yard
|
data/Rakefile
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
require 'rake'
|
2
|
-
require "bundler/gem_tasks"
|
3
|
-
|
4
|
-
# Needed to make the client work on Ruby 1.8.7
|
5
|
-
unless Kernel.respond_to?(:require_relative)
|
6
|
-
module Kernel
|
7
|
-
def require_relative(path)
|
8
|
-
require File.join(File.dirname(caller[0]), path.to_str)
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
require_relative 'spec/vcr_library'
|
14
|
-
|
15
|
-
namespace :bundler do
|
16
|
-
task :setup do
|
17
|
-
require 'bundler/setup'
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
namespace :spec do
|
22
|
-
require 'rspec/core'
|
23
|
-
require 'rspec/core/rake_task'
|
24
|
-
|
25
|
-
desc <<EOS
|
26
|
-
Run all specs. Set VCR_RECORD to 'all' to rerecord and to 'new_episodes'
|
27
|
-
to record new tests. Tapes are in #{VCR_LIBRARY}
|
28
|
-
EOS
|
29
|
-
RSpec::Core::RakeTask.new(:all => :"bundler:setup") do |t|
|
30
|
-
t.pattern = 'spec/**/*_spec.rb'
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
desc "Erase all VCR recordings"
|
35
|
-
task :"vcr:erase" do
|
36
|
-
erase_vcr_library
|
37
|
-
end
|
data/lib/razor/cli/navigate.yaml
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
---
|
2
|
-
|
3
|
-
# This file helps Razor::CLI::Navigate with a few things by annotating the
|
4
|
-
# API. Ultimately, this should be something the server provides. But until
|
5
|
-
# we better understand what sort of annotation we need from the server,
|
6
|
-
# we'll keep this with the client.
|
7
|
-
#
|
8
|
-
# Possible argument types are
|
9
|
-
# - json: parse the argument value as a JSON document and use that
|
10
|
-
# - boolean: if the argument has no value associated with it, or the value
|
11
|
-
# is "true", convert to +true+; everything else gets converted
|
12
|
-
# to +false+
|
13
|
-
commands:
|
14
|
-
create-broker:
|
15
|
-
args:
|
16
|
-
configuration: json
|
17
|
-
create-tag:
|
18
|
-
args:
|
19
|
-
rule: json
|
20
|
-
add-policy-tag:
|
21
|
-
args:
|
22
|
-
rule: json
|
23
|
-
update-tag-rule:
|
24
|
-
args:
|
25
|
-
rule: json
|
26
|
-
reboot-node:
|
27
|
-
args:
|
28
|
-
hard: boolean
|
data/pe-razor-client.gemspec
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
|
5
|
-
Gem::Specification.new do |spec|
|
6
|
-
spec.name = "pe-razor-client"
|
7
|
-
spec.version = "0.14.0"
|
8
|
-
spec.authors = ["Puppet Labs"]
|
9
|
-
spec.email = ["info@puppetlabs.com"]
|
10
|
-
spec.description = "The client for the Razor server"
|
11
|
-
spec.summary = "The client for everybody's favorite provisioning tool"
|
12
|
-
spec.homepage = "https://github.com/puppetlabs/razor-client"
|
13
|
-
spec.license = "ASL2"
|
14
|
-
|
15
|
-
spec.files = `git ls-files`.split($/)
|
16
|
-
spec.bindir = "bin"
|
17
|
-
spec.executables = ['razor']
|
18
|
-
spec.test_files = spec.files.grep(%r{^spec/})
|
19
|
-
spec.require_paths = ["lib"]
|
20
|
-
|
21
|
-
spec.required_ruby_version
|
22
|
-
|
23
|
-
# mime-types is a dependency of rest-client. We need to explicitly depend
|
24
|
-
# on it and pin its version to make sure the gem works with Ruby 1.8.7
|
25
|
-
spec.add_dependency "mime-types", '< 2.0'
|
26
|
-
spec.add_dependency "multi_json"
|
27
|
-
spec.add_dependency "rest-client"
|
28
|
-
spec.add_dependency "terminal-table"
|
29
|
-
|
30
|
-
spec.add_development_dependency "bundler", "~> 1.3"
|
31
|
-
spec.add_development_dependency "rake"
|
32
|
-
end
|
@@ -1,69 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://localhost:8080/api
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
Accept:
|
11
|
-
- application/json
|
12
|
-
Accept-Encoding:
|
13
|
-
- gzip, deflate
|
14
|
-
User-Agent:
|
15
|
-
- Ruby
|
16
|
-
response:
|
17
|
-
status:
|
18
|
-
code: 200
|
19
|
-
message: OK
|
20
|
-
headers:
|
21
|
-
Server:
|
22
|
-
- Apache-Coyote/1.1
|
23
|
-
X-Content-Type-Options:
|
24
|
-
- nosniff
|
25
|
-
Content-Type:
|
26
|
-
- application/json;charset=utf-8
|
27
|
-
Content-Length:
|
28
|
-
- '1566'
|
29
|
-
Date:
|
30
|
-
- Wed, 28 Aug 2013 21:46:05 GMT
|
31
|
-
body:
|
32
|
-
encoding: US-ASCII
|
33
|
-
string: ! '{"commands":[{"name":"create-image","rel":"http://api.puppetlabs.com/razor/v1/commands/create-image","id":"http://localhost:8080/api/commands/create-image"},{"name":"delete-image","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-image","id":"http://localhost:8080/api/commands/delete-image"},{"name":"create-installer","rel":"http://api.puppetlabs.com/razor/v1/commands/create-installer","id":"http://localhost:8080/api/commands/create-installer"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8080/api/commands/create-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8080/api/commands/create-broker"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8080/api/commands/create-policy"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8080/api/collections/brokers"},{"name":"images","rel":"http://api.puppetlabs.com/razor/v1/collections/images","id":"http://localhost:8080/api/collections/images"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8080/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8080/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8080/api/collections/nodes"}]}'
|
34
|
-
http_version:
|
35
|
-
recorded_at: Wed, 28 Aug 2013 21:46:05 GMT
|
36
|
-
- request:
|
37
|
-
method: get
|
38
|
-
uri: http://localhost:8080/api/collections/tags
|
39
|
-
body:
|
40
|
-
encoding: US-ASCII
|
41
|
-
string: ''
|
42
|
-
headers:
|
43
|
-
Accept:
|
44
|
-
- application/json
|
45
|
-
Accept-Encoding:
|
46
|
-
- gzip, deflate
|
47
|
-
User-Agent:
|
48
|
-
- Ruby
|
49
|
-
response:
|
50
|
-
status:
|
51
|
-
code: 200
|
52
|
-
message: OK
|
53
|
-
headers:
|
54
|
-
Server:
|
55
|
-
- Apache-Coyote/1.1
|
56
|
-
X-Content-Type-Options:
|
57
|
-
- nosniff
|
58
|
-
Content-Type:
|
59
|
-
- application/json;charset=utf-8
|
60
|
-
Content-Length:
|
61
|
-
- '2'
|
62
|
-
Date:
|
63
|
-
- Wed, 28 Aug 2013 21:46:05 GMT
|
64
|
-
body:
|
65
|
-
encoding: US-ASCII
|
66
|
-
string: ! '[]'
|
67
|
-
http_version:
|
68
|
-
recorded_at: Wed, 28 Aug 2013 21:46:05 GMT
|
69
|
-
recorded_with: VCR 2.5.0
|