to_yaml 0.2.0 → 0.3.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
  SHA1:
3
- metadata.gz: d5b36a4aeb02db87253d14136ea6fa06509ae4de
4
- data.tar.gz: 6202defc2baf12b90ba3931a10e6e752fdcd4b65
3
+ metadata.gz: dc85762258b833d7c82b4bab4b474385f87d3b26
4
+ data.tar.gz: 6f349c9e5ceb567f4b0d6a663d86a47e0fc0c634
5
5
  SHA512:
6
- metadata.gz: ca7f049f8655514227a2e361210759efe74e96df26da74d52a787d30e809678d104909a48a8201b932b995490781cb832ad573b3a131b52ab0e44ceb343cddca
7
- data.tar.gz: 7efc9453ec6f8da8c750c507b38f4e689ce942ce61ca7a1b228e3e5759cedd917ee9c7effdb3f1fd0db1fe6106d5e1d9f448f355e9539ca3bd88458cc0727e16
6
+ metadata.gz: f9ec97c7496676e15eb12ff368ab348b203e7890abeb05187351c2858164e9a6749ff53577d5a70f6c69294e5601209f64200a1984306828b760aec9cd6a2401
7
+ data.tar.gz: e3a6d77c1688f8e8103088dc9fdb54554efa6439626ea92aeea423e1e6c6ca3b74a837b94f9869af99d31354761d0e20107a8980e3e267ca9a2bbcc15138b6c2
@@ -1,4 +1,5 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 2.1.2
4
- before_install: gem install bundler -v 1.10.5
4
+ - ruby-head
5
+ before_install: gem install bundler
data/README.md CHANGED
@@ -26,12 +26,9 @@ Or install it yourself as:
26
26
 
27
27
  ## Usage
28
28
 
29
- Run:
29
+ Run this simple example:
30
30
 
31
31
  $ echo "[1, 2, 3, 4, 5]" | to_yaml
32
-
33
- You get:
34
-
35
32
  ---
36
33
  - 1
37
34
  - 2
@@ -39,6 +36,17 @@ You get:
39
36
  - 4
40
37
  - 5
41
38
 
39
+ Or, try this when communicating with json api:
40
+
41
+ $ curl -s http://jsonip.com
42
+ {"ip":"123.45.67.89","about":"/about","Pro!":"http://getjsonip.com"}
43
+
44
+ $ curl -s http://jsonip.com | to_yaml
45
+ ---
46
+ ip: 123.45.67.89
47
+ about: /about
48
+ Pro!: http://getjsonip.com
49
+
42
50
  ## Development
43
51
 
44
52
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` or `rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -1,3 +1,3 @@
1
1
  module ToYaml
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -23,4 +23,5 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency "rake"
24
24
  spec.add_development_dependency "rspec_junit_formatter"
25
25
  spec.add_development_dependency "rspec"
26
+ spec.add_runtime_dependency "json"
26
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: to_yaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Liu Lantao
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-07-16 00:00:00.000000000 Z
11
+ date: 2015-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: json
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  description: 'to_yaml: convert json input to yaml format'
70
84
  email:
71
85
  - liulantao@gmail.com
@@ -108,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
122
  version: '0'
109
123
  requirements: []
110
124
  rubyforge_project:
111
- rubygems_version: 2.2.2
125
+ rubygems_version: 2.4.5
112
126
  signing_key:
113
127
  specification_version: 4
114
128
  summary: to_yaml