jiffy 1.1.0 → 1.1.1

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: e0b24cab682865e66e57fcef137dbb16492158d5
4
- data.tar.gz: bf680796b8fec83793ed3f781b60d2108f5cf41f
3
+ metadata.gz: 0b3967d1ee2faeeb2218c26af9eee22723e1cd52
4
+ data.tar.gz: 86164d67e67b0f76dd31d8ebf429f34f7bc6e263
5
5
  SHA512:
6
- metadata.gz: cd4319b4bb0d99edfed8d5836487a15759fa8800ee01edc196532a13e230b84a1311634fcadb7b21da25aff57647f49eeabb3f6ded723d9a84fe6b4b7e6c8791
7
- data.tar.gz: 8dac509b4f86bd815a51f84b5e4a9877fdcf3d6f12b032e4d37886e6206265623a3b606fbc6a7160f534f0ad28fd96711dceaf0149e827b1e58e9638d0fec96f
6
+ metadata.gz: bb5e5facfcee95c5b02867f226c5c4278d9ce76013ea1200cf834aba377422cb4fb882f6c53c5baf9be7fdf00613d6b1d051d8976665f6ede6652effb4168e1d
7
+ data.tar.gz: 05434ceb6574e217ac4c63497e16a8a7783183f47e199634b51f3d92a5f19112e465e739686685ed1ab6b6efa7b26634eca96b8f4b34fac9543848a6230b011d
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jiffy (1.1.0)
4
+ jiffy (1.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -56,13 +56,13 @@ Jiffy.new(in: 'some.json')
56
56
  ```ruby
57
57
  require 'stringio'
58
58
 
59
- in = StringIO.new('[false, true, null]')
60
- out = StringIO.new
61
- outputter = Jiffy::Outputters::Json.new(out: out)
59
+ i = StringIO.new('[false, true, null]')
60
+ o = StringIO.new
61
+ outputter = Jiffy::Outputters::Json.new(out: o)
62
62
 
63
- Jiffy.new(in: in).format(outputter: outputter)
63
+ Jiffy.new(in: i).format(outputter: outputter)
64
64
 
65
- out.string # => "[\n false,\n true,\n null\n]"
65
+ o.string # => "[\n false,\n true,\n null\n]"
66
66
  ```
67
67
 
68
68
  ### Command line usage
@@ -95,6 +95,10 @@ Tested against the following Ruby versions.
95
95
 
96
96
  ## Changelog
97
97
 
98
+ ### 1.1.1
99
+
100
+ * Fixed a bug in outputting of escape sequences.
101
+
98
102
  ### 1.1.0
99
103
 
100
104
  * Fixing an issue where the first digit in numbers was tokenized to :char.
@@ -4,7 +4,7 @@ Gem::Specification.new do |s|
4
4
  s.name = 'jiffy'
5
5
  s.version = Jiffy::VERSION
6
6
  s.license = 'MIT'
7
- s.date = '2014-12-14'
7
+ s.date = '2015-06-04'
8
8
 
9
9
  s.summary = 'A streaming-based JSON formatter in Ruby.'
10
10
  s.description = 'Jiffy utilizes Ragel in order to parse and continuously format JSON data. This allows it to achieve a constant memory usage, independent of the input size.'
@@ -46,7 +46,6 @@ Gem::Specification.new do |s|
46
46
  lib/jiffy/version.rb
47
47
  test/jiffy_test.rb
48
48
  test/outputter_test.rb
49
- test/outputters/json_test.rb
50
49
  ]
51
50
 
52
51
  s.add_development_dependency('minitest')
@@ -19,9 +19,9 @@ class Jiffy
19
19
  rule :exponent, :payload => "e", :color => :cyan
20
20
  rule :minus, :payload => "-", :color => :cyan
21
21
  rule :plus, :payload => "+", :color => :cyan
22
- rule :escaped_quotation_mark, :payload => "\""
23
- rule :escaped_reverse_solidus, :payload => "\\"
24
- rule :escaped_solidus, :payload => "/"
22
+ rule :escaped_quotation_mark, :payload => "\\\""
23
+ rule :escaped_reverse_solidus, :payload => "\\\\"
24
+ rule :escaped_solidus, :payload => "\\/"
25
25
  rule :escaped_backspace, :payload => "\\b"
26
26
  rule :escaped_formfeed, :payload => "\\f"
27
27
  rule :escaped_newline, :payload => "\\n"
@@ -19,9 +19,9 @@ class Jiffy
19
19
  rule :exponent, :payload => "e", :color => :purple
20
20
  rule :minus, :payload => "-", :color => :purple
21
21
  rule :plus, :payload => "+", :color => :purple
22
- rule :escaped_quotation_mark, :payload => "\""
23
- rule :escaped_reverse_solidus, :payload => "\\"
24
- rule :escaped_solidus, :payload => "/"
22
+ rule :escaped_quotation_mark, :payload => "\\\""
23
+ rule :escaped_reverse_solidus, :payload => "\\\\"
24
+ rule :escaped_solidus, :payload => "\\/"
25
25
  rule :escaped_backspace, :payload => "\\b"
26
26
  rule :escaped_formfeed, :payload => "\\f"
27
27
  rule :escaped_newline, :payload => "\\n"
@@ -1,3 +1,3 @@
1
1
  class Jiffy
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jiffy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Amundsen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-14 00:00:00.000000000 Z
11
+ date: 2015-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -77,7 +77,6 @@ files:
77
77
  - lib/jiffy/version.rb
78
78
  - test/jiffy_test.rb
79
79
  - test/outputter_test.rb
80
- - test/outputters/json_test.rb
81
80
  homepage: https://github.com/badeball/jiffy
82
81
  licenses:
83
82
  - MIT
@@ -1,22 +0,0 @@
1
- require 'minitest/autorun'
2
- require 'jiffy/outputters/json'
3
-
4
- describe Jiffy::JsonOutputter do
5
- describe '#initialize' do
6
- it 'should raise an error when :out does not respond to #print' do
7
- out = Object.new
8
-
9
- def out.respond_to?(method)
10
- if method == :print
11
- false
12
- else
13
- super
14
- end
15
- end
16
-
17
- assert_raises ArgumentError do
18
- Jiffy::JsonOutputter.new out: out
19
- end
20
- end
21
- end
22
- end