rubicure 0.2.7 → 0.2.8

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: 63feed9490ed2fefb22e2389fb87a7678b9670ca
4
- data.tar.gz: 6d95f7ce7a2a98fdc466472fe777a8083949cf3e
3
+ metadata.gz: aeb46d28b213353aca4275c0ba741d98e086f55b
4
+ data.tar.gz: c31f821d4ff1f92bc12ce35073d6e67189e0c1e4
5
5
  SHA512:
6
- metadata.gz: a4a94aa5534a4d17780848163aff8cab3e06960340ceff7566b77a5cd6771f64501fe4bf57e99b9128ea12875424a35561ea6a1d134289bb06ccc3245bee614b
7
- data.tar.gz: de25bb71f2b80b4030f00f73ee21b9aa73957d077ee83a92c56d7d0bd122e9e0f4d355a5f0396864e4f6fe944ed5c6401980a2fcb75738769cea8538d9c97142
6
+ metadata.gz: 916d0c137b2b6df38054b8e62e0bbdf06fe765ddacd83e84725a3e90e9d822ac41b1df494cd7edfa3461b7f54c8b2d4901e7c23671c74ee27b323f730f3da170
7
+ data.tar.gz: eb29d5cf2c5bf55f635db54a580306289ebd5e673ef899701f9535fafc5be7300ca64b1d5e8941583f782fdb4bf1f5107856b7ff8f5c6739a02591b03d69b6da
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## master
2
- [full changelog](http://github.com/sue445/rubicure/compare/v0.2.7...master)
2
+ [full changelog](http://github.com/sue445/rubicure/compare/v0.2.8...master)
3
+
4
+ ## v0.2.8
5
+ [full changelog](http://github.com/sue445/rubicure/compare/v0.2.7...v0.2.8)
6
+
7
+ * Impl Rubicure::Series#to_json
8
+ * https://github.com/sue445/rubicure/pull/83
3
9
 
4
10
  ## v0.2.7
5
11
  [full changelog](http://github.com/sue445/rubicure/compare/v0.2.6...v0.2.7)
@@ -55,7 +55,15 @@ module Rubicure
55
55
  def each_with_girls
56
56
  girls.each { |girl| yield girl }
57
57
  end
58
- alias_method :each, :each_with_girls
58
+ alias_method_chain :each, :girls
59
+
60
+ def to_json
61
+ original_hash = {}
62
+ each_without_girls do |k, v|
63
+ original_hash[k] = v
64
+ end
65
+ original_hash.to_json
66
+ end
59
67
 
60
68
  class << self
61
69
  # @return [Array<Symbol>]
@@ -1,3 +1,3 @@
1
1
  module Rubicure
2
- VERSION = "0.2.7"
2
+ VERSION = "0.2.8"
3
3
  end
data/spec/series_spec.rb CHANGED
@@ -134,4 +134,19 @@ describe Rubicure::Series do
134
134
 
135
135
  it { expect { |b| series.each_with_girls(&b) }.to yield_successive_args(Rubicure::Girl, Rubicure::Girl) }
136
136
  end
137
+
138
+ describe "#to_json" do
139
+ subject { series.to_json }
140
+
141
+ let(:series) { Rubicure::Series.find(series_name) }
142
+ let(:series_name) { :splash_star }
143
+
144
+ let(:json) do
145
+ <<-JSON
146
+ {\"series_name\":\"splash_star\",\"title\":\"ふたりはプリキュア Splash☆Star\",\"started_date\":\"2006-02-05\",\"ended_date\":\"2007-01-28\",\"girls\":[\"cure_bloom\",\"cure_egret\"]}
147
+ JSON
148
+ end
149
+
150
+ it { should eq json.squish }
151
+ end
137
152
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubicure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445