fontana_client_support 0.5.5 → 0.5.6
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 +8 -8
- data/bin/fontana_fixture +26 -0
- data/lib/fontana/fixture.rb +16 -0
- data/lib/fontana.rb +3 -0
- data/lib/fontana_client_support/version.rb +1 -1
- data/lib/fontana_client_support.rb +1 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODNkZThlYjhhNWMzZGM2OTZjNGU3YzA0ZmU4N2QzYWUzNjMyNmQ0Ng==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MmMxZTY5NGM5MGRmZjlmZTBiZjYzMjJlNDE1MGExNzJmMTY5MTY0Mg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDI5OTY3OTI5MTc1NTk4ODRkMDUxNWM0NjQ2OWY4ZDU5NjQzN2I2ZjM3MmQx
|
10
|
+
ZmRiNjc4ZWE1ZTk4MjdmMGJjN2ZhMmRlOTU5ZWFkODJhOTVhNjBkNjVjOWZh
|
11
|
+
ZWNkMjk2MGJlZmJhNzA1ZGEwYTU0NjNhOTY3NjM1Njc5NzJlZjE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjQxNmFiYmUxYTRlMDVkOGI0MmFhNWUyNmZmZDliZGI0OTJhMDY5MjJmMDE1
|
14
|
+
ZmQ0YTMyYTdhZWY0NjcxYWE3MmE3Y2EwN2E5NGFiOWM1Zjk5ZDk1MzNjYjYy
|
15
|
+
NTU3MzI4ZWUxNzViMmFkZGNlMDljMTdiMTAxZTg3M2NlZTM1ZDk=
|
data/bin/fontana_fixture
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
$LOAD_PATH << File.expand_path("../../lib", __FILE__)
|
4
|
+
|
5
|
+
require 'optparse'
|
6
|
+
|
7
|
+
default_options = {
|
8
|
+
"host" => "localhost",
|
9
|
+
"port" => 3000,
|
10
|
+
}
|
11
|
+
|
12
|
+
banner = "%s <fixture_name> [options]" % File.basename(__FILE__)
|
13
|
+
parser = OptionParser.new(banner) do |opt|
|
14
|
+
opt.on '-h', '--host HOST'
|
15
|
+
opt.on '-p', '--port PORT'
|
16
|
+
opt.on '-a', "--address BINDING_ADDRESS"
|
17
|
+
opt.on '-d', '--document-root DOCUMENT_ROOT_PATH'
|
18
|
+
end
|
19
|
+
|
20
|
+
fixture_name = ARGV.shift
|
21
|
+
|
22
|
+
options = default_options.merge(parser.getopts(ARGV))
|
23
|
+
options = options.each_with_object({}){|(k,v), d| d[k.gsub(/-/, '_').to_sym] = v}
|
24
|
+
|
25
|
+
require 'fontana'
|
26
|
+
Fontana.load_fixture(fixture_name, options)
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require "fontana"
|
2
|
+
|
3
|
+
require 'httpclient'
|
4
|
+
|
5
|
+
module Fontana
|
6
|
+
|
7
|
+
module Fixture
|
8
|
+
def load_fixture(fixture_name, options = {})
|
9
|
+
options = options.update({host: "localhost", port: 3000})
|
10
|
+
c = HTTPClient.new
|
11
|
+
res = c.post("http://#{options[:host]}:#{options[:port]}/libgss_test/fixture_loadings/#{fixture_name}.json", "_method" => "put")
|
12
|
+
raise "#{res.code} #{res.http_body.content}" unless res.code.to_s =~ /\A2\d\d\Z/
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
data/lib/fontana.rb
CHANGED
@@ -4,6 +4,9 @@ module Fontana
|
|
4
4
|
autoload :CommandUtils, 'fontana/command_utils'
|
5
5
|
autoload :ServerRake , 'fontana/server_rake'
|
6
6
|
autoload :RakeUtils , 'fontana/rake_utils'
|
7
|
+
autoload :Fixture , 'fontana/fixture'
|
8
|
+
|
9
|
+
extend Fontana::Fixture
|
7
10
|
|
8
11
|
class << self
|
9
12
|
# attr_accessor :home
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fontana_client_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- akima
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -85,6 +85,7 @@ email:
|
|
85
85
|
- t-akima@groovenauts.jp
|
86
86
|
executables:
|
87
87
|
- fontana_config_server
|
88
|
+
- fontana_fixture
|
88
89
|
extensions: []
|
89
90
|
extra_rdoc_files: []
|
90
91
|
files:
|
@@ -95,9 +96,11 @@ files:
|
|
95
96
|
- README.md
|
96
97
|
- Rakefile
|
97
98
|
- bin/fontana_config_server
|
99
|
+
- bin/fontana_fixture
|
98
100
|
- fontana_client_support.gemspec
|
99
101
|
- lib/fontana.rb
|
100
102
|
- lib/fontana/command_utils.rb
|
103
|
+
- lib/fontana/fixture.rb
|
101
104
|
- lib/fontana/rake_utils.rb
|
102
105
|
- lib/fontana/server_rake.rb
|
103
106
|
- lib/fontana_client_support.rb
|