index_html 0.0.8 → 0.0.9
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 +4 -4
 - data/README.md +10 -3
 - data/index_html.gemspec +2 -5
 - data/lib/index_html/version.rb +1 -1
 - data/lib/index_html.rb +0 -3
 - data/spec/spec_helper.rb +1 -1
 - metadata +6 -8
 - data/lib/active_support/core_ext/hash/hash.rb +0 -35
 - data/lib/active_support/core_ext/kernel/reporting.rb +0 -34
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: f1c345be9fe3f4aed1e932b2584f533cdf367188
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 00730f936cd958810e42ee11206fd9741529e33c
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 92949a5e97234dbfe41ca95e9cda05249f6a5825fb38e922699919c9a236a2c7a563b990cd97a2e45d9cf0dfdcbbc08ab4e9632f6952fd5e41c73bf371d57d97
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 282c50275176f9f8ca7d217b142d4bed66e42e642c76ad62167a3effbcfbde8c99923aa71db638ed7011b76ab3abbdee9e976b5925bb3b06e92515a7e6c59f77
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -1,6 +1,8 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ## IndexHtml
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            [](http://badge.fury.io/rb/index_html)
         
     | 
| 
      
 4 
     | 
    
         
            +
            [](https://gemnasium.com/agilecreativity/index_html)
         
     | 
| 
      
 5 
     | 
    
         
            +
            [](https://codeclimate.com/github/agilecreativity/index_html)
         
     | 
| 
       4 
6 
     | 
    
         | 
| 
       5 
7 
     | 
    
         
             
            Quickly generate the index.html files based on your simple criteria.
         
     | 
| 
       6 
8 
     | 
    
         | 
| 
         @@ -125,12 +127,16 @@ The output file `index.html` should be something like 
     | 
|
| 
       125 
127 
     | 
    
         | 
| 
       126 
128 
     | 
    
         
             
            ### Changelogs
         
     | 
| 
       127 
129 
     | 
    
         | 
| 
      
 130 
     | 
    
         
            +
            #### 0.0.9
         
     | 
| 
      
 131 
     | 
    
         
            +
             
     | 
| 
      
 132 
     | 
    
         
            +
            - Update gem dependencies
         
     | 
| 
      
 133 
     | 
    
         
            +
            - Make use of shared library from [agile_utils][]
         
     | 
| 
      
 134 
     | 
    
         
            +
            - Add links to [codeclimate][] and [gemnasium][]
         
     | 
| 
      
 135 
     | 
    
         
            +
             
     | 
| 
       128 
136 
     | 
    
         
             
            #### 0.0.8
         
     | 
| 
       129 
137 
     | 
    
         | 
| 
       130 
138 
     | 
    
         
             
            - Upgrade to [code_lister][] version 0.0.7
         
     | 
| 
       131 
     | 
    
         
            -
             
     | 
| 
       132 
139 
     | 
    
         
             
            - Use the [agile_utils][] for shared option
         
     | 
| 
       133 
     | 
    
         
            -
             
     | 
| 
       134 
140 
     | 
    
         
             
            - Fix style using [rubocop][] gem
         
     | 
| 
       135 
141 
     | 
    
         | 
| 
       136 
142 
     | 
    
         
             
            #### 0.0.7
         
     | 
| 
         @@ -148,7 +154,6 @@ The output file `index.html` should be something like 
     | 
|
| 
       148 
154 
     | 
    
         
             
            #### 0.0.4
         
     | 
| 
       149 
155 
     | 
    
         | 
| 
       150 
156 
     | 
    
         
             
            - Update [code_lister][] to 0.0.6 for new option
         
     | 
| 
       151 
     | 
    
         
            -
             
     | 
| 
       152 
157 
     | 
    
         
             
            - Fix the mistake in '-d' option
         
     | 
| 
       153 
158 
     | 
    
         | 
| 
       154 
159 
     | 
    
         
             
            #### 0.0.3
         
     | 
| 
         @@ -174,3 +179,5 @@ GitHub pull requests are even better!. 
     | 
|
| 
       174 
179 
     | 
    
         
             
            [code_lister]: https://rubygems.org/gems/code_lister
         
     | 
| 
       175 
180 
     | 
    
         
             
            [ebook_renamer]: https://rubygems.org/gems/ebook_renamer
         
     | 
| 
       176 
181 
     | 
    
         
             
            [rubocop]: https://github.com/bbatsov/rubocop
         
     | 
| 
      
 182 
     | 
    
         
            +
            [gemnasium]: https://gemnasium.com/agilecreativity/index_html
         
     | 
| 
      
 183 
     | 
    
         
            +
            [code_climate]: https://codeclimate.com/github/agilecreativity/index_html
         
     | 
    
        data/index_html.gemspec
    CHANGED
    
    | 
         @@ -12,16 +12,13 @@ Gem::Specification.new do |spec| 
     | 
|
| 
       12 
12 
     | 
    
         
             
              spec.summary       = %q{Generate simple index.html from list of files based on simple criteria}
         
     | 
| 
       13 
13 
     | 
    
         
             
              spec.homepage      = 'https://github.com/agilecreativity/index_html'
         
     | 
| 
       14 
14 
     | 
    
         
             
              spec.license       = 'MIT'
         
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
15 
     | 
    
         
             
              spec.files         = `git ls-files`.split($/)
         
     | 
| 
       17 
16 
     | 
    
         
             
              spec.executables   = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
         
     | 
| 
       18 
17 
     | 
    
         
             
              spec.test_files    = spec.files.grep(%r{^(test|spec|features)/})
         
     | 
| 
       19 
18 
     | 
    
         
             
              spec.require_paths = ['lib']
         
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
19 
     | 
    
         
             
              spec.add_runtime_dependency 'thor', '~> 0.19'
         
     | 
| 
       22 
     | 
    
         
            -
              spec.add_runtime_dependency 'agile_utils', '~> 0.0. 
     | 
| 
       23 
     | 
    
         
            -
              spec.add_runtime_dependency 'code_lister', '~> 0.0. 
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
      
 20 
     | 
    
         
            +
              spec.add_runtime_dependency 'agile_utils', '~> 0.0.8'
         
     | 
| 
      
 21 
     | 
    
         
            +
              spec.add_runtime_dependency 'code_lister', '~> 0.0.8'
         
     | 
| 
       25 
22 
     | 
    
         
             
              spec.add_development_dependency 'awesome_print', '~> 1.2'
         
     | 
| 
       26 
23 
     | 
    
         
             
              spec.add_development_dependency 'bundler', '~> 1.3'
         
     | 
| 
       27 
24 
     | 
    
         
             
              spec.add_development_dependency 'fuubar', '~> 1.3'
         
     | 
    
        data/lib/index_html/version.rb
    CHANGED
    
    
    
        data/lib/index_html.rb
    CHANGED
    
    | 
         @@ -2,9 +2,6 @@ require 'uri' 
     | 
|
| 
       2 
2 
     | 
    
         
             
            require 'code_lister'
         
     | 
| 
       3 
3 
     | 
    
         
             
            require_relative './index_html/version'
         
     | 
| 
       4 
4 
     | 
    
         
             
            require_relative './index_html/cli'
         
     | 
| 
       5 
     | 
    
         
            -
            require_relative './active_support/core_ext/hash/hash'
         
     | 
| 
       6 
     | 
    
         
            -
            require_relative './active_support/core_ext/kernel/reporting'
         
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
       8 
5 
     | 
    
         
             
            module IndexHtml
         
     | 
| 
       9 
6 
     | 
    
         
             
              CustomError = Class.new(StandardError)
         
     | 
| 
       10 
7 
     | 
    
         
             
              class << self
         
     | 
    
        data/spec/spec_helper.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: index_html
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.9
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Burin Choomnuan
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2014-04- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2014-04-29 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: thor
         
     | 
| 
         @@ -30,28 +30,28 @@ dependencies: 
     | 
|
| 
       30 
30 
     | 
    
         
             
                requirements:
         
     | 
| 
       31 
31 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       32 
32 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       33 
     | 
    
         
            -
                    version: 0.0. 
     | 
| 
      
 33 
     | 
    
         
            +
                    version: 0.0.8
         
     | 
| 
       34 
34 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       35 
35 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       36 
36 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       37 
37 
     | 
    
         
             
                requirements:
         
     | 
| 
       38 
38 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       39 
39 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       40 
     | 
    
         
            -
                    version: 0.0. 
     | 
| 
      
 40 
     | 
    
         
            +
                    version: 0.0.8
         
     | 
| 
       41 
41 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       42 
42 
     | 
    
         
             
              name: code_lister
         
     | 
| 
       43 
43 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       44 
44 
     | 
    
         
             
                requirements:
         
     | 
| 
       45 
45 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       46 
46 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       47 
     | 
    
         
            -
                    version: 0.0. 
     | 
| 
      
 47 
     | 
    
         
            +
                    version: 0.0.8
         
     | 
| 
       48 
48 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       49 
49 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       50 
50 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       51 
51 
     | 
    
         
             
                requirements:
         
     | 
| 
       52 
52 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       53 
53 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       54 
     | 
    
         
            -
                    version: 0.0. 
     | 
| 
      
 54 
     | 
    
         
            +
                    version: 0.0.8
         
     | 
| 
       55 
55 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       56 
56 
     | 
    
         
             
              name: awesome_print
         
     | 
| 
       57 
57 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -181,8 +181,6 @@ files: 
     | 
|
| 
       181 
181 
     | 
    
         
             
            - Rakefile
         
     | 
| 
       182 
182 
     | 
    
         
             
            - bin/index_html
         
     | 
| 
       183 
183 
     | 
    
         
             
            - index_html.gemspec
         
     | 
| 
       184 
     | 
    
         
            -
            - lib/active_support/core_ext/hash/hash.rb
         
     | 
| 
       185 
     | 
    
         
            -
            - lib/active_support/core_ext/kernel/reporting.rb
         
     | 
| 
       186 
184 
     | 
    
         
             
            - lib/index_html.rb
         
     | 
| 
       187 
185 
     | 
    
         
             
            - lib/index_html/cli.rb
         
     | 
| 
       188 
186 
     | 
    
         
             
            - lib/index_html/version.rb
         
     | 
| 
         @@ -1,35 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            class Hash
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
              # File activesupport/lib/active_support/core_ext/hash/keys.rb
         
     | 
| 
       4 
     | 
    
         
            -
              #
         
     | 
| 
       5 
     | 
    
         
            -
              # hash = { name: 'Rob', age: '28' }
         
     | 
| 
       6 
     | 
    
         
            -
              # hash.transform_keys{ |key| key.to_s.upcase }
         
     | 
| 
       7 
     | 
    
         
            -
              # => { "NAME" => "Rob", "AGE" => "28" }
         
     | 
| 
       8 
     | 
    
         
            -
              def transform_keys
         
     | 
| 
       9 
     | 
    
         
            -
                result = {}
         
     | 
| 
       10 
     | 
    
         
            -
                each_key do |key|
         
     | 
| 
       11 
     | 
    
         
            -
                  result[yield(key)] = self[key]
         
     | 
| 
       12 
     | 
    
         
            -
                end
         
     | 
| 
       13 
     | 
    
         
            -
                result
         
     | 
| 
       14 
     | 
    
         
            -
              end
         
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
              def transform_keys!(&block)
         
     | 
| 
       17 
     | 
    
         
            -
                keys.each do |key|
         
     | 
| 
       18 
     | 
    
         
            -
                  value = delete(key)
         
     | 
| 
       19 
     | 
    
         
            -
                  self[yield(key)] = value.is_a?(Hash) ? value.transform_keys!(&block) : value
         
     | 
| 
       20 
     | 
    
         
            -
                end
         
     | 
| 
       21 
     | 
    
         
            -
                self
         
     | 
| 
       22 
     | 
    
         
            -
              end
         
     | 
| 
       23 
     | 
    
         
            -
             
     | 
| 
       24 
     | 
    
         
            -
              # hash = { 'name' => 'Rob', 'age' => '28' }
         
     | 
| 
       25 
     | 
    
         
            -
              # hash.symbolize_keys
         
     | 
| 
       26 
     | 
    
         
            -
              # => { name: "Rob", age: "28" }
         
     | 
| 
       27 
     | 
    
         
            -
              def symbolize_keys
         
     | 
| 
       28 
     | 
    
         
            -
                transform_keys{ |key| key.to_sym rescue key }
         
     | 
| 
       29 
     | 
    
         
            -
              end
         
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
              # File activesupport/lib/active_support/core_ext/hash/keys.rb, line 135
         
     | 
| 
       32 
     | 
    
         
            -
              def symbolize_keys!
         
     | 
| 
       33 
     | 
    
         
            -
                transform_keys!{ |key| key.to_sym rescue key }
         
     | 
| 
       34 
     | 
    
         
            -
              end
         
     | 
| 
       35 
     | 
    
         
            -
            end
         
     | 
| 
         @@ -1,34 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            require 'tempfile'
         
     | 
| 
       2 
     | 
    
         
            -
            module Kernel
         
     | 
| 
       3 
     | 
    
         
            -
              # From: 'activesupport-4.1.0/lib/active_support/core_ext/kernel/reporting.rb
         
     | 
| 
       4 
     | 
    
         
            -
              #
         
     | 
| 
       5 
     | 
    
         
            -
              # Captures the given stream and returns it:
         
     | 
| 
       6 
     | 
    
         
            -
              #
         
     | 
| 
       7 
     | 
    
         
            -
              #   stream = capture(:stdout) { puts 'notice' }
         
     | 
| 
       8 
     | 
    
         
            -
              #   stream # => "notice\n"
         
     | 
| 
       9 
     | 
    
         
            -
              #
         
     | 
| 
       10 
     | 
    
         
            -
              #   stream = capture(:stderr) { warn 'error' }
         
     | 
| 
       11 
     | 
    
         
            -
              #   stream # => "error\n"
         
     | 
| 
       12 
     | 
    
         
            -
              #
         
     | 
| 
       13 
     | 
    
         
            -
              # even for subprocesses:
         
     | 
| 
       14 
     | 
    
         
            -
              #
         
     | 
| 
       15 
     | 
    
         
            -
              #   stream = capture(:stdout) { system('echo notice') }
         
     | 
| 
       16 
     | 
    
         
            -
              #   stream # => "notice\n"
         
     | 
| 
       17 
     | 
    
         
            -
              #
         
     | 
| 
       18 
     | 
    
         
            -
              #   stream = capture(:stderr) { system('echo error 1>&2') }
         
     | 
| 
       19 
     | 
    
         
            -
              #   stream # => "error\n"
         
     | 
| 
       20 
     | 
    
         
            -
              def capture(stream)
         
     | 
| 
       21 
     | 
    
         
            -
                stream = stream.to_s
         
     | 
| 
       22 
     | 
    
         
            -
                captured_stream = Tempfile.new(stream)
         
     | 
| 
       23 
     | 
    
         
            -
                stream_io = eval("$#{stream}")
         
     | 
| 
       24 
     | 
    
         
            -
                origin_stream = stream_io.dup
         
     | 
| 
       25 
     | 
    
         
            -
                stream_io.reopen(captured_stream)
         
     | 
| 
       26 
     | 
    
         
            -
                yield
         
     | 
| 
       27 
     | 
    
         
            -
                stream_io.rewind
         
     | 
| 
       28 
     | 
    
         
            -
                return captured_stream.read
         
     | 
| 
       29 
     | 
    
         
            -
              ensure
         
     | 
| 
       30 
     | 
    
         
            -
                captured_stream.close
         
     | 
| 
       31 
     | 
    
         
            -
                captured_stream.unlink
         
     | 
| 
       32 
     | 
    
         
            -
                stream_io.reopen(origin_stream)
         
     | 
| 
       33 
     | 
    
         
            -
              end
         
     | 
| 
       34 
     | 
    
         
            -
            end
         
     |