how_is 14.0.0 → 15.0.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: 92f7a27a7c77dee45b47a1f7c072caa9fe1254f4
4
- data.tar.gz: d06011cb83a0677ded7e352f4858d3c3f78a33cf
3
+ metadata.gz: 780caeff9872fb8e036d0af805bf57131e4d6738
4
+ data.tar.gz: f7bed1cf2f9c9d88629463d2edb2fbd191f81ad1
5
5
  SHA512:
6
- metadata.gz: 2bd834db9ec70f3872fe17eb71d1421e55b81d72f4034cad5317d5da035448df72015fac0963e0862a631f600833d86561d2716d320948c955a444dda6a13438
7
- data.tar.gz: d8eb09c869da7db70bacf8447dcd84759fe836ae6cf4f9e6108af2f2d51b38f3c3079d3aeb4791be5d4df9bd4e9263d14da7f009b6105ce508e2d0f5db39fd54
6
+ metadata.gz: dbc13b729e2b2956a2b22ac9dc100a65c50e90ab766db7da50f46fcc86fa631b14df90a5f82980c04179ce7ebbc1f9228f617c1a809c7b3ae1ce8724d0ea786a
7
+ data.tar.gz: e834dda8575bb61b623c2c3779d840435b4b8c33d91478049b0313ade6b1ad72c600a75980d28323471d66e14bc925f211ff9c5908298e3926b7c3d93c592953
data/CHANGELOG.md CHANGED
@@ -9,6 +9,16 @@ this project adheres to [Semantic Versioning](http://semver.org).
9
9
 
10
10
  (Nothing so far.)
11
11
 
12
+ ## [v15.0.0]
13
+
14
+ This release ([snapshot](https://github.com/how-is/how_is/tree/v15.0.0))
15
+ implements `HowIs.from_json`.
16
+
17
+ ### Changes
18
+
19
+ * Implemented `How_is.from_json`.
20
+ ([#126](https://github.com/how-is/how_is/pull/126))
21
+
12
22
  ## [v14.0.0]
13
23
 
14
24
  This release ([snapshot](https://github.com/how-is/how_is/tree/v14.0.0))
@@ -1,3 +1,3 @@
1
1
  class HowIs
2
- VERSION = "14.0.0"
2
+ VERSION = "15.0.0"
3
3
  end
data/lib/how_is.rb CHANGED
@@ -25,8 +25,9 @@ class HowIs
25
25
 
26
26
  ##
27
27
  # Generates and returns a report as a String.
28
- def initialize(repository, **kw_args)
29
- @analysis = HowIs.generate_analysis(repository: repository, **kw_args)
28
+ def initialize(repository, analysis = nil, **kw_args)
29
+ analysis ||= HowIs.generate_analysis(repository: repository, **kw_args)
30
+ @analysis = analysis
30
31
  end
31
32
 
32
33
  def to_html
@@ -37,6 +38,13 @@ class HowIs
37
38
  Report.export(@analysis, :json)
38
39
  end
39
40
 
41
+ def self.from_json(json)
42
+ data = JSON.parse(json)
43
+ analysis = HowIs::Analysis.new(data)
44
+
45
+ self.new(data['repository'], analysis)
46
+ end
47
+
40
48
  ##
41
49
  # Returns a list of possible export formats.
42
50
  def self.supported_formats
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: how_is
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.0.0
4
+ version: 15.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ellen Marie Dash