fira 0.4.0 → 0.4.1

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.
data/.gitattributes ADDED
@@ -0,0 +1,22 @@
1
+ # Auto detect text files and perform LF normalization
2
+ * text=auto
3
+
4
+ # Custom for Visual Studio
5
+ *.cs diff=csharp
6
+ *.sln merge=union
7
+ *.csproj merge=union
8
+ *.vbproj merge=union
9
+ *.fsproj merge=union
10
+ *.dbproj merge=union
11
+
12
+ # Standard to msysgit
13
+ *.doc diff=astextplain
14
+ *.DOC diff=astextplain
15
+ *.docx diff=astextplain
16
+ *.DOCX diff=astextplain
17
+ *.dot diff=astextplain
18
+ *.DOT diff=astextplain
19
+ *.pdf diff=astextplain
20
+ *.PDF diff=astextplain
21
+ *.rtf diff=astextplain
22
+ *.RTF diff=astextplain
data/.gitignore CHANGED
@@ -1,17 +1,17 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in fira.gemspec
4
- gemspec
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in fira.gemspec
4
+ gemspec
data/LICENSE.txt CHANGED
@@ -1,22 +1,22 @@
1
- Copyright (c) 2013 Cameron Sutter
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
1
+ Copyright (c) 2013 Cameron Sutter
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
22
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile CHANGED
@@ -1 +1 @@
1
- require "bundler/gem_tasks"
1
+ require "bundler/gem_tasks"
data/bin/fira.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- ID_REGEX = /([^'"]*)#([a-z_A-Z\-]+)(.*)/
3
+ ID_REGEX = / #([a-z_A-Z\-]+)/
4
4
  CLASS_REGEX = / \.([a-z_A-Z\-]+)/
5
5
 
6
6
  def parse_text(text)
@@ -10,8 +10,8 @@ def parse_text(text)
10
10
  if token[0] == "<" and token[token.length - 1] == ">" and token[1] != "/"
11
11
  #if it's an opening tag, analyze it
12
12
 
13
- #find and replace fira ID attributes
14
- result = token.sub(ID_REGEX, '\1 id="\2" \3')
13
+ #find and replace fira ID attribute
14
+ result = token.sub(ID_REGEX, ' id="\1"')
15
15
 
16
16
  #find fira class attributes
17
17
  classes = result.scan(CLASS_REGEX)
data/lib/fira/engine.rb CHANGED
@@ -3,7 +3,7 @@ module Fira
3
3
  class Engine
4
4
 
5
5
 
6
- ID_REGEX = /([^'"]*)#([a-z_A-Z\-]+)(.*)/
6
+ ID_REGEX = / #([a-z_A-Z\-]+)/
7
7
  CLASS_REGEX = / \.([a-z_A-Z\-]+)/
8
8
 
9
9
  def parse_text(text)
@@ -14,7 +14,7 @@ module Fira
14
14
  #if it's an opening tag, analyze it
15
15
 
16
16
  #find and replace fira ID attributes
17
- result = token.sub(ID_REGEX, '\1 id="\2" \3')
17
+ result = token.sub(ID_REGEX, ' id="\1"')
18
18
 
19
19
  #find fira class attributes
20
20
  classes = result.scan(CLASS_REGEX)
data/lib/fira/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Fira
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
@@ -1,2 +1,2 @@
1
- <h1><%= class_name %>#<%= @action %></h1>
2
- <p>Find me in <%= @path %></p>
1
+ <h1><%= class_name %>#<%= @action %></h1>
2
+ <p>Find me in <%= @path %></p>
@@ -1,3 +1,3 @@
1
- <%= class_name %>#<%= @action %>
2
-
3
- <%%= @greeting %>, find me in app/views/<%= @path %>
1
+ <%= class_name %>#<%= @action %>
2
+
3
+ <%%= @greeting %>, find me in app/views/<%= @path %>
@@ -1,6 +1,6 @@
1
- <h1>Editing <%= singular_table_name %></h1>
2
-
3
- <%%= render 'form' %>
4
-
5
- <%%= link_to 'Show', @<%= singular_table_name %> %> |
6
- <%%= link_to 'Back', <%= index_helper %>_path %>
1
+ <h1>Editing <%= singular_table_name %></h1>
2
+
3
+ <%%= render 'form' %>
4
+
5
+ <%%= link_to 'Show', @<%= singular_table_name %> %> |
6
+ <%%= link_to 'Back', <%= index_helper %>_path %>
@@ -1,27 +1,27 @@
1
- <h1>Listing <%= plural_table_name %></h1>
2
-
3
- <table>
4
- <tr>
5
- <% attributes.each do |attribute| -%>
6
- <th><%= attribute.human_name %></th>
7
- <% end -%>
8
- <th></th>
9
- <th></th>
10
- <th></th>
11
- </tr>
12
-
13
- <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
14
- <tr>
15
- <% attributes.each do |attribute| -%>
16
- <td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
17
- <% end -%>
18
- <td><%%= link_to 'Show', <%= singular_table_name %> %></td>
19
- <td><%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %></td>
20
- <td><%%= link_to 'Destroy', <%= singular_table_name %>, <%= key_value :method, ":delete" %>, <%= key_value :data, "{ #{key_value :confirm, "'Are you sure?'"} }" %> %></td>
21
- </tr>
22
- <%% end %>
23
- </table>
24
-
25
- <br />
26
-
27
- <%%= link_to 'New <%= human_name %>', new_<%= singular_table_name %>_path %>
1
+ <h1>Listing <%= plural_table_name %></h1>
2
+
3
+ <table>
4
+ <tr>
5
+ <% attributes.each do |attribute| -%>
6
+ <th><%= attribute.human_name %></th>
7
+ <% end -%>
8
+ <th></th>
9
+ <th></th>
10
+ <th></th>
11
+ </tr>
12
+
13
+ <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
14
+ <tr>
15
+ <% attributes.each do |attribute| -%>
16
+ <td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
17
+ <% end -%>
18
+ <td><%%= link_to 'Show', <%= singular_table_name %> %></td>
19
+ <td><%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %></td>
20
+ <td><%%= link_to 'Destroy', <%= singular_table_name %>, <%= key_value :method, ":delete" %>, <%= key_value :data, "{ #{key_value :confirm, "'Are you sure?'"} }" %> %></td>
21
+ </tr>
22
+ <%% end %>
23
+ </table>
24
+
25
+ <br />
26
+
27
+ <%%= link_to 'New <%= human_name %>', new_<%= singular_table_name %>_path %>
@@ -1,5 +1,5 @@
1
- <h1>New <%= singular_table_name %></h1>
2
-
3
- <%%= render 'form' %>
4
-
5
- <%%= link_to 'Back', <%= index_helper %>_path %>
1
+ <h1>New <%= singular_table_name %></h1>
2
+
3
+ <%%= render 'form' %>
4
+
5
+ <%%= link_to 'Back', <%= index_helper %>_path %>
@@ -1,12 +1,12 @@
1
- <p id="notice"><%%= notice %></p>
2
-
3
- <% attributes.each do |attribute| -%>
4
- <p>
5
- <b><%= attribute.human_name %>:</b>
6
- <%%= @<%= singular_table_name %>.<%= attribute.name %> %>
7
- </p>
8
-
9
- <% end -%>
10
-
11
- <%%= link_to 'Edit', edit_<%= singular_table_name %>_path(@<%= singular_table_name %>) %> |
12
- <%%= link_to 'Back', <%= index_helper %>_path %>
1
+ <p id="notice"><%%= notice %></p>
2
+
3
+ <% attributes.each do |attribute| -%>
4
+ <p>
5
+ <b><%= attribute.human_name %>:</b>
6
+ <%%= @<%= singular_table_name %>.<%= attribute.name %> %>
7
+ </p>
8
+
9
+ <% end -%>
10
+
11
+ <%%= link_to 'Edit', edit_<%= singular_table_name %>_path(@<%= singular_table_name %>) %> |
12
+ <%%= link_to 'Back', <%= index_helper %>_path %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fira
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-27 00:00:00.000000000 Z
12
+ date: 2013-04-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -85,6 +85,7 @@ executables:
85
85
  extensions: []
86
86
  extra_rdoc_files: []
87
87
  files:
88
+ - .gitattributes
88
89
  - .gitignore
89
90
  - Gemfile
90
91
  - LICENSE.txt