ruby_lepton 0.1.3 → 0.1.4

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
  SHA256:
3
- metadata.gz: e69dd5ed54841f416dbc170b3f5619c2a126151903523cd322aa2d60c3ea660c
4
- data.tar.gz: 461fc60aeecd06b50c06e91ac04f5c1301c487f42ab314ac6bd566630d280a4d
3
+ metadata.gz: 514a4fb11aefa759aa0224b4d5b2c2dc336c2f0c64da583641fd3f8ac5ef4237
4
+ data.tar.gz: f0bddd69dcc704a86bb55b6a44dfec5d57675fb4b1d4f9f44a13d1240868257b
5
5
  SHA512:
6
- metadata.gz: fbdcd67196621e9f433ce86d31b7f3c0ab0b998d1746d180fc5cf79af5554b8023f7930053446aeb2ea2b8c2fed3f127792f8ab487d4ba9c6278485a5aeb66e1
7
- data.tar.gz: cb9726bfd5e8fceca6cf6c03d2640f43499e387783b9b03fe72d2214ff1c38df31966086a8efa8d98fa8dd2774097d45860706b226ddea0c3c188b2a2a30817f
6
+ metadata.gz: 1b099219e2d41ecff7ac3ff919ff24dd27ba65b7d267e29397839dd1b61b6b6a01b284b8c336d61f6ef827ad85d329952cae5bb85f75df12441061240b87460b
7
+ data.tar.gz: 37255326aa0f1d8984a9ea5aef85c1111bb2c0ae7323e28f974b87356ca1045ea36e7558a9e0e14de3a1a3a6e959def7bff181fc06d3fbc952a1e8c2ae85e164
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby_lepton (0.1.3)
4
+ ruby_lepton (0.1.4)
5
5
  thor
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -1,7 +1,8 @@
1
1
 
2
-
3
2
  # Ruby Lepton
3
+ [![Gem Version](https://badge.fury.io/rb/ruby_lepton.svg)](https://badge.fury.io/rb/ruby_lepton)
4
4
 
5
+ ## Description
5
6
  A Ruby wrapper library for Dropbox JPEG Lepton compression tool.
6
7
 
7
8
  ## Getting started
@@ -20,13 +21,11 @@ sudo apt install lepton
20
21
 
21
22
  ## Installation
22
23
 
23
- Clone the repo:
24
-
25
- ```
24
+ ```ruby
26
25
  gem install ruby_lepton
27
26
  ```
28
27
  or include inside Gemfile
29
- ```
28
+ ```ruby
30
29
  gem "ruby_lepton"
31
30
  ```
32
31
  Install ruby lepton:
@@ -35,14 +34,18 @@ Install ruby lepton:
35
34
 
36
35
  ## Usage
37
36
 
38
- Compress method
39
- ```
37
+ **Compress method**
38
+ ```ruby
40
39
  RubyLepton::Base.compress(path_to_source_file, options)
41
40
  ```
42
- Decompress method
43
- ```
41
+ returns output file path: `"output/filename.lep"`
42
+
43
+ **Decompress method**
44
+ ```ruby
44
45
  RubyLepton::Base.decompress(path_to_source_file, options)
45
46
  ```
47
+ returns output file path: `"output/filename.jpeg"`
48
+
46
49
  `options` can be passed as hash `{binary: true}`
47
50
 
48
51
  Supported options:
@@ -57,34 +60,34 @@ Generate binstubs for CLI commands:
57
60
  `ruby_lepton` executable will be generated under `bin/` folder
58
61
 
59
62
 
60
- To compress a file:
63
+ **Compress a image:**
61
64
  ```
62
65
  $ bundle exec ruby_lepton compress [PATH] [OPTIONS]
63
66
  ```
64
- To decompress a file:
67
+ **Decompress a file:**
65
68
  ```
66
69
  $ bundle exec ruby_lepton decompress [PATH] [OPTIONS]
67
70
  ```
68
71
 
69
- #### Options
70
- ```
71
- $ bundle exec ruby_lepton compress path_to_file --verbose --binary
72
- $ bundle exec ruby_lepton decompress path_to_file --no-verbose --no-binary
73
- ```
74
- or you can pass alias for binary
72
+ File is generated after compression and decompression under `output/` folder
73
+
74
+ **Options**
75
75
  ```
76
- $ bundle exec ruby_lepton compress path_to_file -b
77
- $ bundle exec ruby_lepton decompress path_to_file -b
76
+ $ bundle exec ruby_lepton compress path_to_file --verbose
77
+ $ bundle exec ruby_lepton decompress path_to_file --no-verbose
78
78
  ```
79
79
  ## Output
80
80
 
81
81
  #### File generation
82
- By default, file is generated for compression and decompression under `output/` folder
82
+ By default, file is generated after compression and decompression under `output/` folder
83
+ ```ruby
84
+ RubyLepton::Base.decompress(path_to_source_file)
85
+ ```
83
86
 
84
87
  #### Binary data
85
- Binary data will be returned instead of file by passing `--binary` option
86
- ```
87
- $ bundle exec ruby_lepton compress path_to_file --binary
88
+ Binary data will be returned instead of file by passing `{binary: true}` option
89
+ ```ruby
90
+ RubyLepton::Base.decompress(path_to_source_file, {binary: true})
88
91
  ```
89
92
 
90
93
  File is not generated when `--binary` option is passed
@@ -15,6 +15,7 @@ module RubyLepton
15
15
  return output.read
16
16
  else
17
17
  puts "Compressed file saved to: " + generated_file
18
+ return generated_file
18
19
  end
19
20
  else
20
21
  puts "Error in compression"
@@ -31,6 +32,7 @@ module RubyLepton
31
32
  return output.read
32
33
  else
33
34
  puts "Decompressed file saved to: " + generated_file
35
+ return generated_file
34
36
  end
35
37
  else
36
38
  puts "Error in decompression"
@@ -1,3 +1,3 @@
1
1
  module RubyLepton
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_lepton
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-13 00:00:00.000000000 Z
11
+ date: 2020-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor