how_is 15.0.0 → 16.0.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 780caeff9872fb8e036d0af805bf57131e4d6738
4
- data.tar.gz: f7bed1cf2f9c9d88629463d2edb2fbd191f81ad1
3
+ metadata.gz: 8929c02d281911c56705a2939b5b761fa04c67bf
4
+ data.tar.gz: d862b1a8b03741d9ea7bb5e356fd536f80798c1d
5
5
  SHA512:
6
- metadata.gz: dbc13b729e2b2956a2b22ac9dc100a65c50e90ab766db7da50f46fcc86fa631b14df90a5f82980c04179ce7ebbc1f9228f617c1a809c7b3ae1ce8724d0ea786a
7
- data.tar.gz: e834dda8575bb61b623c2c3779d840435b4b8c33d91478049b0313ade6b1ad72c600a75980d28323471d66e14bc925f211ff9c5908298e3926b7c3d93c592953
6
+ metadata.gz: 4376b4925083261c500ad3943fa3737bb9af6616a4777c4eac387630964cff6b9e3d8c44b6411544cd3cb5e37dfcba880112f96d55d7bea58cca145ba0b533a2
7
+ data.tar.gz: de3b662db3bfccbd888662372b9cfb4bb3b4f318c37679d7db4211f0d0ece7f9f923f78ceb8af4230287f0c68c59b8dcdddd4fd2c8845c29b9400c0bcc5a9c0b
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
+ ## [v16.0.0]
13
+
14
+ This release ([snapshot](https://github.com/how-is/how_is/tree/v16.0.0))
15
+ makes `HowIs.from_json` actually parse dates.
16
+
17
+ ### Changes
18
+
19
+ * Make `HowIs.from_json` parse dates.
20
+ ([#127](https://github.com/how-is/how_is/pull/127))
21
+
12
22
  ## [v15.0.0]
13
23
 
14
24
  This release ([snapshot](https://github.com/how-is/how_is/tree/v15.0.0))
@@ -54,11 +54,8 @@ class HowIs
54
54
 
55
55
  ##
56
56
  # Generates an analysis from a JSON report.
57
- def from_file(file)
58
- extension = file.split('.').last
59
- raise UnsupportedImportFormat, extension unless extension == 'json'
60
-
61
- hash = JSON.parse(open(file).read)
57
+ def self.from_json(json)
58
+ hash = JSON.parse(json)
62
59
  hash = hash.map do |k, v|
63
60
  v = DateTime.parse(v) if k.end_with?('_date')
64
61
 
@@ -1,3 +1,3 @@
1
1
  class HowIs
2
- VERSION = "15.0.0"
2
+ VERSION = "16.0.0"
3
3
  end
data/lib/how_is.rb CHANGED
@@ -39,10 +39,9 @@ class HowIs
39
39
  end
40
40
 
41
41
  def self.from_json(json)
42
- data = JSON.parse(json)
43
- analysis = HowIs::Analysis.new(data)
42
+ analysis = HowIs::Analyzer.from_json(json)
44
43
 
45
- self.new(data['repository'], analysis)
44
+ self.new(analysis.repository, analysis)
46
45
  end
47
46
 
48
47
  ##
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: 15.0.0
4
+ version: 16.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ellen Marie Dash