stylus 1.0.0 → 1.0.1

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: aae79b1819cdb41d494c214ff4dcce6fc309b2b5
4
- data.tar.gz: dd62bd41cf976f92c2e6a5a18948e9e306da3f53
3
+ metadata.gz: 1566bf07cbd7a850d8d71b919559eb5a2fb9b017
4
+ data.tar.gz: 5125d3def706e75fd455a298b5bf9fb4885ad472
5
5
  SHA512:
6
- metadata.gz: 2df912f5de8d59046f46cb1c3c2aeb32829f17e145f08bb5f8c70b6da51ce83d0cd0d47ca2c31207d22d33c563bee6a3ebae2df805e91a0cbf29ee7397a5607b
7
- data.tar.gz: 04a96508add2597861566cabfe481d7e0f6b953a290cfb89e547bbe0fd9e46370f81a928aab3205a3546446c52772c0d8fb06f425b52b0bd653678102771208e
6
+ metadata.gz: 7049f9b42626a132a83daa1db13721e31fbc248410a5f844b5e626b322419eea3e828c746ab613b55a8f8ae3633184b13c88eae33a897cc22762f162685f1eba
7
+ data.tar.gz: 17e72872fbbf27f0b64d2dfe3b5f5dbf7130398897a7f1965193b6a64256f632f56aacea71d5de5ad016f3d2f69f2de21edbbeba8987134c6caede12f326be54
@@ -1,4 +1,8 @@
1
- ### HEAD - 1.0.0
1
+ ### 1.0.1
2
+
3
+ * Prevent exceptions from files without extensions.
4
+
5
+ ### 1.0.0
2
6
 
3
7
  * Rails 4+ and Ruby 1.9.x/2.0.0 support.
4
8
  * Support for the `asset-path` and `asset-url` mixins, thanks to [@spilin](https://github.com/spilin).
@@ -36,7 +36,7 @@ asset-path(key)
36
36
  # Returns string representations of hash in Stylus syntax
37
37
  def assets_hash(scope)
38
38
  @assets_hash ||= scope.environment.each_logical_path.each_with_object({ :url => '', :path => '' }) do |logical_path, assets_hash|
39
- unless logical_path =~/.*\.(css|js)$/
39
+ unless File.extname(logical_path) =~ /^(\.(css|js)|)$/
40
40
  path_to_asset = scope.path_to_asset(logical_path)
41
41
  assets_hash[:url] << "('#{logical_path}' url(\"#{path_to_asset}\")) "
42
42
  assets_hash[:path] << "('#{logical_path}' \"#{path_to_asset}\") "
@@ -1,3 +1,3 @@
1
1
  module Stylus
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
@@ -0,0 +1,58 @@
1
+ class PostsController < ApplicationController
2
+ before_action :set_post, only: [:show, :edit, :update, :destroy]
3
+
4
+ # GET /posts
5
+ def index
6
+ @posts = Post.all
7
+ end
8
+
9
+ # GET /posts/1
10
+ def show
11
+ end
12
+
13
+ # GET /posts/new
14
+ def new
15
+ @post = Post.new
16
+ end
17
+
18
+ # GET /posts/1/edit
19
+ def edit
20
+ end
21
+
22
+ # POST /posts
23
+ def create
24
+ @post = Post.new(post_params)
25
+
26
+ if @post.save
27
+ redirect_to @post, notice: 'Post was successfully created.'
28
+ else
29
+ render action: 'new'
30
+ end
31
+ end
32
+
33
+ # PATCH/PUT /posts/1
34
+ def update
35
+ if @post.update(post_params)
36
+ redirect_to @post, notice: 'Post was successfully updated.'
37
+ else
38
+ render action: 'edit'
39
+ end
40
+ end
41
+
42
+ # DELETE /posts/1
43
+ def destroy
44
+ @post.destroy
45
+ redirect_to posts_url, notice: 'Post was successfully destroyed.'
46
+ end
47
+
48
+ private
49
+ # Use callbacks to share common setup or constraints between actions.
50
+ def set_post
51
+ @post = Post.find(params[:id])
52
+ end
53
+
54
+ # Only allow a trusted parameter "white list" through.
55
+ def post_params
56
+ params[:post]
57
+ end
58
+ end
@@ -0,0 +1,2 @@
1
+ module PostsHelper
2
+ end
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stylus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Mazza
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-13 00:00:00.000000000 Z
11
+ date: 2014-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: execjs
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: stylus-source
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
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
40
  version: '0'
41
41
  description: Bridge library to compile .styl stylesheets from ruby code.
@@ -51,17 +51,17 @@ files:
51
51
  - lib/rails/generators/stylus/assets/assets_generator.rb
52
52
  - lib/rails/generators/stylus/assets/templates/stylesheet.css.styl
53
53
  - lib/rails/generators/stylus/scaffold/scaffold_generator.rb
54
+ - lib/stylus.rb
54
55
  - lib/stylus/import_processor.rb
55
56
  - lib/stylus/railtie.rb
57
+ - lib/stylus/runtime.rb
56
58
  - lib/stylus/runtime/compiler.js
57
59
  - lib/stylus/runtime/runner.js
58
- - lib/stylus/runtime.rb
59
60
  - lib/stylus/sprockets.rb
61
+ - lib/stylus/tilt.rb
60
62
  - lib/stylus/tilt/rails.rb
61
63
  - lib/stylus/tilt/stylus.rb
62
- - lib/stylus/tilt.rb
63
64
  - lib/stylus/version.rb
64
- - lib/stylus.rb
65
65
  - spec/generators/assets_generator_spec.rb
66
66
  - spec/generators/controller_generator_spec.rb
67
67
  - spec/generators/scaffold_generator_spec.rb
@@ -72,6 +72,8 @@ files:
72
72
  - spec/sprockets_spec.rb
73
73
  - spec/stylus_spec.rb
74
74
  - spec/support/generators/test_case.rb
75
+ - spec/support/generators/tmp/app/controllers/posts_controller.rb
76
+ - spec/support/generators/tmp/app/helpers/posts_helper.rb
75
77
  - spec/support/generators/tmp/config/routes.rb
76
78
  - spec/support/helpers.rb
77
79
  - spec/support/matchers.rb
@@ -87,17 +89,17 @@ require_paths:
87
89
  - lib
88
90
  required_ruby_version: !ruby/object:Gem::Requirement
89
91
  requirements:
90
- - - '>='
92
+ - - ">="
91
93
  - !ruby/object:Gem::Version
92
94
  version: '0'
93
95
  required_rubygems_version: !ruby/object:Gem::Requirement
94
96
  requirements:
95
- - - '>='
97
+ - - ">="
96
98
  - !ruby/object:Gem::Version
97
99
  version: '0'
98
100
  requirements: []
99
101
  rubyforge_project:
100
- rubygems_version: 2.0.3
102
+ rubygems_version: 2.2.0
101
103
  signing_key:
102
104
  specification_version: 4
103
105
  summary: Ruby Stylus Compiler
@@ -112,6 +114,8 @@ test_files:
112
114
  - spec/sprockets_spec.rb
113
115
  - spec/stylus_spec.rb
114
116
  - spec/support/generators/test_case.rb
117
+ - spec/support/generators/tmp/app/controllers/posts_controller.rb
118
+ - spec/support/generators/tmp/app/helpers/posts_helper.rb
115
119
  - spec/support/generators/tmp/config/routes.rb
116
120
  - spec/support/helpers.rb
117
121
  - spec/support/matchers.rb