hamlit-rails 0.2.1 → 0.2.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
  SHA256:
3
- metadata.gz: a34fa5b1d8ec968ef13f9196cc2a0d0cffd98bd6112c204b09e3434712ab72b9
4
- data.tar.gz: efd950241b08a20902b506ef2a00d1e4e5c5ce1a9781bbb042ed5423b1fa9477
3
+ metadata.gz: 319028cff90b97795ed54c5f6bf8d39d063c55eb1b7b62ec2470331e8619f73d
4
+ data.tar.gz: d01ec7a948d3b84d43aa413be33b868585fb71f455247dbe6d689371f4ae7c64
5
5
  SHA512:
6
- metadata.gz: c274442a9aad510e18e442444898b07391fb3e1a6c9ceafd0419349a8090cccdf1564c0292049a669ee528404c9435a3a5465f046a65606b9605ba929f4e96f7
7
- data.tar.gz: c7c58c2faa966a233175c843788853dad8c1830f6fb44188b237db713d9cf0a66524089c23b0b6973fba2d20b2b96760a898bbdfdad3d1231758bbf1b6636ae5
6
+ metadata.gz: 0ec1dc941f9c3dc080c207ee22792067d92401dc918498e4b09771a839b8c81f5edad770f8df8bc861e594a8ac567fdee4fc533346825d6f82680a827a91a686
7
+ data.tar.gz: 1583154cf94df61ce98ee0e40aaf1ade09c7b307499cda150cd0721418213ff1180bd6e82584785d6509174bc6457b45ab6b7d3478c8e6a1c84c181731049440
data/.travis.yml CHANGED
@@ -1,16 +1,20 @@
1
1
  language: ruby
2
2
  cache: bundler
3
- before_install: "gem install bundler"
4
- rvm:
5
- - 2.0.0
6
- - 2.1.0
7
- - 2.2.0
8
- gemfile:
9
- - gemfiles/rails_4_0.gemfile
10
- - gemfiles/rails_4_1.gemfile
11
- - gemfiles/rails_4_2.gemfile
12
- - gemfiles/rails_latest.gemfile
13
- addons:
14
- code_climate:
15
- repo_token: b310674f6c6c6e6b425087fd4bfd38b2f6def3afc8db24009ad23372140d0ef4
3
+ before_install: "which bundle || gem install bundler"
4
+ matrix:
5
+ include:
6
+ - rvm: 2.4.5
7
+ gemfile: gemfiles/rails_5_2.gemfile
8
+ - rvm: 2.5.3
9
+ gemfile: gemfiles/rails_5_2.gemfile
10
+ - rvm: 2.6.1
11
+ gemfile: gemfiles/rails_4_2.gemfile
12
+ - rvm: 2.6.1
13
+ gemfile: gemfiles/rails_5_0.gemfile
14
+ - rvm: 2.6.1
15
+ gemfile: gemfiles/rails_5_1.gemfile
16
+ - rvm: 2.6.1
17
+ gemfile: gemfiles/rails_5_2.gemfile
18
+ - rvm: 2.6.1
19
+ gemfile: gemfiles/rails_latest.gemfile
16
20
  script: "bundle exec rake test"
data/Appraisals CHANGED
@@ -1,15 +1,19 @@
1
- appraise "rails_4_0" do
2
- gem "rails", "~> 4.0.1"
1
+ appraise "rails_4_2" do
2
+ gem "rails", "4.2"
3
3
  end
4
4
 
5
- appraise "rails_4_1" do
6
- gem "rails", "4.1"
5
+ appraise "rails_5_0" do
6
+ gem "rails", "5.0"
7
7
  end
8
8
 
9
- appraise "rails_4_2" do
10
- gem "rails", "4.2"
9
+ appraise "rails_5_1" do
10
+ gem "rails", "5.1"
11
+ end
12
+
13
+ appraise "rails_5_2" do
14
+ gem "rails", "5.2"
11
15
  end
12
16
 
13
17
  appraise "rails_latest" do
14
18
  gem "rails"
15
- end
19
+ end
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  Hamlit-rails
2
2
  ============
3
3
 
4
- [![Build Status](https://travis-ci.org/mfung/hamlit-rails.svg)](https://travis-ci.org/mfung/hamlit-rails) [![Gem Version](https://badge.fury.io/rb/hamlit-rails.svg)](http://badge.fury.io/rb/hamlit-rails) [![Code Climate](https://codeclimate.com/github/mfung/hamlit-rails/badges/gpa.svg)](https://codeclimate.com/github/mfung/hamlit-rails) [![Test Coverage](https://codeclimate.com/github/mfung/hamlit-rails/badges/coverage.svg)](https://codeclimate.com/github/mfung/hamlit-rails/coverage)
4
+ [![Build Status](https://travis-ci.org/mfung/hamlit-rails.svg)](https://travis-ci.org/mfung/hamlit-rails) [![Gem Version](https://badge.fury.io/rb/hamlit-rails.svg)](http://badge.fury.io/rb/hamlit-rails)
5
5
 
6
- Provides hamlit generators for Rails 4. It also enables hamlit as the templating
7
- engine and "hamlit:html2haml" rake task that converts erb files to haml.
6
+ Provides hamlit generators for Rails. It also enables hamlit as the templating
7
+ engine and "hamlit:erb2haml" rake task that converts erb files to haml.
8
8
 
9
9
  ## Installation
10
10
 
@@ -24,13 +24,13 @@ Or install it yourself as:
24
24
 
25
25
  ## Usage
26
26
 
27
- TODO: Write usage instructions here
27
+ By installing this gem, Haml templates are generated on `rails g`.
28
28
 
29
- ## Development
29
+ Also, use the following rake task to convert .erb to .haml:
30
30
 
31
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
32
-
33
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
31
+ ```
32
+ bundle exec rake hamlit:erb2haml
33
+ ```
34
34
 
35
35
  ## Contributing
36
36
 
@@ -46,4 +46,4 @@ And is written because of an issue created in that repo.
46
46
 
47
47
  ## License
48
48
 
49
- MIT license
49
+ MIT license
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "4.1"
5
+ gem "rails", "5.0"
6
6
 
7
7
  gemspec :path => "../"
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 4.0.1"
5
+ gem "rails", "5.1"
6
6
 
7
7
  gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "5.2"
6
+
7
+ gemspec :path => "../"
data/hamlit-rails.gemspec CHANGED
@@ -24,10 +24,9 @@ Gem::Specification.new do |spec|
24
24
  spec.add_runtime_dependency "actionpack", ">= 4.0.1"
25
25
  spec.add_runtime_dependency "railties", ">= 4.0.1"
26
26
 
27
- spec.add_development_dependency "bundler", "~> 1.9"
27
+ spec.add_development_dependency "bundler"
28
28
  spec.add_development_dependency "html2haml", ">= 2.0.0"
29
29
  spec.add_development_dependency "rake", "~> 10.0"
30
30
  spec.add_development_dependency "rails", ">= 4.0.1"
31
31
  spec.add_development_dependency "appraisal", "~> 1.0"
32
- spec.add_development_dependency "codeclimate-test-reporter", ">= 0.4.7"
33
32
  end
data/lib/hamlit-rails.rb CHANGED
@@ -43,7 +43,7 @@ module Haml
43
43
  # provided directly by railties 3.2..4.1 but was dropped in 4.2.
44
44
  if Gem::Requirement.new(">= 4.2").satisfied_by?(Gem::Version.new(::Rails.version))
45
45
  initializer 'hamlit_rails.configure_source_annotation' do
46
- if Gem::Requirement.new(">= 6.0").satisfied_by?(Gem::Version.new(::Rails.version))
46
+ if ::Rails::VERSION::MAJOR >= 6
47
47
  annotation_class = ::Rails::SourceAnnotationExtractor::Annotation
48
48
  else
49
49
  annotation_class = SourceAnnotationExtractor::Annotation
@@ -1,5 +1,5 @@
1
1
  module Hamlit
2
2
  module Rails
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hamlit-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Meng Fung
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-25 00:00:00.000000000 Z
11
+ date: 2019-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hamlit
@@ -70,16 +70,16 @@ dependencies:
70
70
  name: bundler
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '1.9'
75
+ version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '1.9'
82
+ version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: html2haml
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -136,20 +136,6 @@ dependencies:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: '1.0'
139
- - !ruby/object:Gem::Dependency
140
- name: codeclimate-test-reporter
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - ">="
144
- - !ruby/object:Gem::Version
145
- version: 0.4.7
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - ">="
151
- - !ruby/object:Gem::Version
152
- version: 0.4.7
153
139
  description: hamlit-rails provides generators for Rails 4.
154
140
  email:
155
141
  - meng.fung@gmail.com
@@ -167,9 +153,10 @@ files:
167
153
  - Rakefile
168
154
  - bin/console
169
155
  - bin/setup
170
- - gemfiles/rails_4_0.gemfile
171
- - gemfiles/rails_4_1.gemfile
172
156
  - gemfiles/rails_4_2.gemfile
157
+ - gemfiles/rails_5_0.gemfile
158
+ - gemfiles/rails_5_1.gemfile
159
+ - gemfiles/rails_5_2.gemfile
173
160
  - gemfiles/rails_latest.gemfile
174
161
  - hamlit-rails.gemspec
175
162
  - lib/generators/haml/controller/controller_generator.rb