ifilter 0.0.1 → 0.0.2

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: 8129ac66b6af909e2afc5a47bfa8fe6e563ebbf0
4
- data.tar.gz: 5e976e1bcc01f9024a4727d9ca30799e92b6e148
3
+ metadata.gz: 4346819b44891789bee5cf71fa41b5ed77a2e327
4
+ data.tar.gz: a6d7004130e9738acba6fe78a7d95c854fa5e471
5
5
  SHA512:
6
- metadata.gz: e22eeb3debb9ab81741b6385f50b444496307946e4491bc99f511741b51041a03a3ac987a96042cd995ae3079f3d6b93cbdc9dcc43f6bb41b82b85cd18a98059
7
- data.tar.gz: f0e8d0d50140544fb56a11f53ab3f7e69bc9abc74d408fe26b651fc3f71c71b042f39b0e60c86bae4b88df525845d77ec1591945921bf45977300cf8061cb678
6
+ metadata.gz: 9367fdff5ba43b72e927c53aa4f9982cd24c8afcfd0783cbba5269558119e6ff3ba6da0a9e21e051df8b5fad81e50e901a7d9adf031879e625cd18f61c3fc4e1
7
+ data.tar.gz: e8d1ab223624a75c5cb40ac347008471dc9101ddaaf337fa8b1ac1c473d3a8a429fb64b63e3aa7bad7863c296ab670f71134b8358e35dc3547d05c8db8ee8008
data/README.md CHANGED
@@ -6,6 +6,8 @@ Interactive Filter.
6
6
 
7
7
  Ifilter provides the interactive filtering.
8
8
 
9
+ In addition to using a executable file, it can be used as a module.
10
+
9
11
  ## Installation
10
12
 
11
13
  ```sh
@@ -17,3 +19,25 @@ Add this line to your application's Gemfile:
17
19
  ```ruby
18
20
  gem 'ifilter'
19
21
  ```
22
+
23
+ ## Usage
24
+
25
+ ### Executable File
26
+
27
+ ```sh
28
+ $ ps aux | ifilter
29
+ ```
30
+
31
+ ![execute](https://raw.github.com/wiki/kaihar4/ifilter/images/execute.gif)
32
+
33
+ ### Module Style
34
+
35
+ ```ruby
36
+ # test.rb
37
+ require 'ifilter'
38
+
39
+ array = ['foo', 'bar', 'hoge', 'fuga']
40
+ puts Ifilter.filtering(array)
41
+ ```
42
+
43
+ ![module](https://raw.github.com/wiki/kaihar4/ifilter/images/module.gif)
data/ifilter.gemspec CHANGED
@@ -16,7 +16,6 @@ Gem::Specification.new do |spec|
16
16
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
17
  spec.require_paths = ['lib']
18
18
 
19
- spec.add_runtime_dependency 'colorize'
20
19
  spec.add_runtime_dependency 'curses'
21
20
 
22
21
  spec.add_development_dependency 'bundler', '~> 1.7'
@@ -1,3 +1,3 @@
1
1
  module Ifilter
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
data/lib/ifilter.rb CHANGED
@@ -4,7 +4,7 @@ require 'ifilter/input'
4
4
 
5
5
  module Ifilter
6
6
  def self.filtering(repositories)
7
- name = caller.last.match(/.+\/(.+?)(:|\.)/)[1].capitalize
7
+ name = caller.last.match(/([^\/]+?)(\.|:)/)[1].capitalize
8
8
 
9
9
  isatty = STDOUT.isatty
10
10
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ifilter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - kaihar4
@@ -10,20 +10,6 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2014-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: colorize
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: curses
29
15
  requirement: !ruby/object:Gem::Requirement