lens_protocol 0.1.0 → 0.1.1

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
  SHA256:
3
- metadata.gz: 9072daaf6fa8bfc140c0c7cda8d472ae3e947c89e0311995c4ce9dfb1c40c3dd
4
- data.tar.gz: d64a4645a7bcf2a4190873262660008a90152f5f7b475e39528dd701076a11c7
3
+ metadata.gz: f52440ba4cb5aa106d20f5e2dec603fd8f75508d00a07002e5194dc0117d1ffa
4
+ data.tar.gz: 686003127105da31fd7c098f9503080436e6dbffb59cc4ea8acd57e15b858d08
5
5
  SHA512:
6
- metadata.gz: 5ac11fe4748409cbaa5ce6def4e4e16e50dc76bc09bba20ac014e8125f1492a0e60f5822d1cf9133fe302f7760268c10060c5425532ea55829dedce132e37d5a
7
- data.tar.gz: 014722c7b8a2e6568a97e1042031e479d87cf5c3a38e6d6bac96eee43b73c81f41902ec81553cb0f5f3db75746ed0e58d873d8024a39ce30eda1a09dce0f05d1
6
+ metadata.gz: 37e3d839004b895a670aeb2ca292f78c11489fcf0d24173b16d563222d645a374722289a53300848ffe5fba4b93d19d59ad07d71a637276fc35441b5b6864b1f
7
+ data.tar.gz: f70bc9f019573762fced363a312eaa72ee9ba35a173dc385abe76a04757f444b33deb3b862723e34ebd6c382e0655d67f500a6fcc5265317b1283a40f1febed9
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lens_protocol (0.1.0)
4
+ lens_protocol (0.1.1)
5
5
  activesupport (>= 4.0)
6
6
  nokogiri
7
7
 
data/README.md CHANGED
@@ -8,20 +8,10 @@ Furthermore, it allows you to generate a SVG representation of the tracing datas
8
8
 
9
9
  ## Installation
10
10
 
11
- Add this line to your application's Gemfile:
12
-
13
11
  ```ruby
14
12
  gem 'lens_protocol'
15
13
  ```
16
14
 
17
- And then execute:
18
-
19
- $ bundle
20
-
21
- Or install it yourself as:
22
-
23
- $ gem install lens_protocol
24
-
25
15
  ## Usage
26
16
 
27
17
  ### Parsing an OMA file
@@ -32,7 +22,19 @@ message = LensProtocol::OMA.parse(File.read('examples/oma/R360_1.oma'))
32
22
  message.values_of('SPH') # => [1.25, -0.5]
33
23
  ```
34
24
 
35
- ### Generating the tracing data SVG
25
+ ### Generating an OMA file
26
+ ```ruby
27
+ message = LensProtocol::OMA.generate(
28
+ 'JOB' => 42,
29
+ 'SPH' => [1.25, -0.5]
30
+ )
31
+ puts message
32
+ # =>
33
+ # JOB=42
34
+ # SPH=1.25;-0.50
35
+ ```
36
+
37
+ ### Generating the Tracing SVG
36
38
 
37
39
  The `message.to_svg` method returns an array of SVG strings, one for each side, which can be used directly in an ERB template, like this:
38
40
 
@@ -7,6 +7,10 @@ module LensProtocol
7
7
  Parser.new.parse *args
8
8
  end
9
9
 
10
+ def generate *args
11
+ Message.from_hash *args
12
+ end
13
+
10
14
  def format *args
11
15
  Formatter.new.format *args
12
16
  end
@@ -1,3 +1,3 @@
1
1
  module LensProtocol
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lens_protocol
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emmanuel Nicolau