rpr 0.7.0 → 0.8.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: 09187a49f07762509a754fa2e311c8670a12b61e
4
- data.tar.gz: 0df2758541f2bd55cf7c8834bca6e9d11f9465dc
3
+ metadata.gz: 3a4d24bdadcaf47084a445631d39bd63e523f04a
4
+ data.tar.gz: 3b4ab4d48fb0489569529dd35c89050edfe0c338
5
5
  SHA512:
6
- metadata.gz: 38a559b084a67f674c3d3b1c4726ee70e10890c4cf76b2aea02ca15970adc953d6daa3bf72eaaf58053a7fd2e77e6fca9195f0a2e78a6d7848bba095c5ede6e6
7
- data.tar.gz: 32b0247d0cfe9e300c70e84ccb42016f915291404a5554fae021d8537b1ccc3d49d07f8d1d844ba899a05e12f712ab6c55ce94e31425339daed69c284801bbac
6
+ metadata.gz: 60cffce494881d5bb8370bb11dae8731b8bbdfd7da1be1c60f4724775393f4b6a9e7000afb7cfd93b03e70d2a801faab1eeb2e07de7b6f4d3409f79a9010f2e5
7
+ data.tar.gz: eb749728ae6102d1cd94f8de4d1ed0ae1fb5a6e693ce775086ae08b658938757e598c110be22656cd6ec8dd4372911c82d1587d04cf8a74c1b93231f29c6a656
data/README.md CHANGED
@@ -126,6 +126,21 @@ locals: _ __ _dir_ _ex_ _file_ _in_ _out_ _pry_
126
126
  [3] pry(#<Array>)> exit
127
127
  ```
128
128
 
129
+ ### Configuration
130
+
131
+ Rpr searches config file from `./.rpr` or `~/.config/rpr`. `./.rpr` is priority.
132
+
133
+ Config file is space separated options.
134
+
135
+ #### Example.
136
+
137
+ `./.rpr` or `~/.config/rpr`
138
+
139
+ ```
140
+ -f pry
141
+ ```
142
+
143
+
129
144
  ## Development
130
145
 
131
146
  After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
data/exe/rpr CHANGED
@@ -2,4 +2,6 @@
2
2
 
3
3
  require 'rpr'
4
4
 
5
- Rpr.run(ARGV)
5
+ args = Rpr::Config.laod
6
+ args.concat(ARGV)
7
+ Rpr.run(args)
data/lib/rpr.rb CHANGED
@@ -1,4 +1,6 @@
1
1
  require "rpr/version"
2
+ require 'rpr/config'
3
+
2
4
  require 'ripper'
3
5
  require 'optparse'
4
6
 
data/lib/rpr/config.rb ADDED
@@ -0,0 +1,19 @@
1
+ # Rpr searchs config file h from ./.rpr, ~/.config/rpr
2
+ module Rpr
3
+ module Config
4
+ class << self
5
+ def laod
6
+ fname = ['./.rpr', File.expand_path('~/.config/rpr')].find{|path| File.exist?(path)}
7
+ return load_file(fname)
8
+ end
9
+
10
+
11
+ private
12
+
13
+ def load_file(fname)
14
+ return [] unless fname
15
+ File.read(fname).split(' ')
16
+ end
17
+ end
18
+ end
19
+ end
data/lib/rpr/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rpr
2
- VERSION = "0.7.0"
2
+ VERSION = "0.8.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rpr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masataka Kuwabara
@@ -156,6 +156,7 @@ files:
156
156
  - bin/setup
157
157
  - exe/rpr
158
158
  - lib/rpr.rb
159
+ - lib/rpr/config.rb
159
160
  - lib/rpr/formatter/json.rb
160
161
  - lib/rpr/formatter/pp.rb
161
162
  - lib/rpr/formatter/pry.rb