apotomo 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/apotomo.gemspec CHANGED
@@ -19,11 +19,11 @@ Gem::Specification.new do |s|
19
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
20
  s.require_paths = ["lib"]
21
21
 
22
- s.add_dependency "rails", "~> 3.0"
23
- s.add_dependency "cells", "~> 3.5.6"
22
+ s.add_dependency "cells", ">= 3.5.6"
24
23
  s.add_dependency "onfire", "~> 0.2.0"
25
24
  s.add_dependency "hooks", "~> 0.1.3"
26
25
 
27
26
  s.add_development_dependency "shoulda"
28
27
  s.add_development_dependency "slim"
28
+ s.add_development_dependency "haml"
29
29
  end
@@ -1,3 +1,5 @@
1
+ require 'action_view/helpers/javascript_helper'
2
+
1
3
  module Apotomo
2
4
  class JavascriptGenerator
3
5
  def initialize(framework)
@@ -9,21 +11,11 @@ module Apotomo
9
11
  "#{javascript}"
10
12
  end
11
13
 
12
- # Copied from ActionView::Helpers::JavascriptHelper.
13
- JS_ESCAPE_MAP = {
14
- '\\' => '\\\\',
15
- '</' => '<\/',
16
- "\r\n" => '\n',
17
- "\n" => '\n',
18
- "\r" => '\n',
19
- '"' => '\\"',
20
- "'" => "\\'" }
14
+ JS_ESCAPER = Object.new.extend(::ActionView::Helpers::JavaScriptHelper)
21
15
 
22
16
  # Escape carrier returns and single and double quotes for JavaScript segments.
23
17
  def self.escape(javascript)
24
- return javascript.gsub(/(\\|<\/|\r\n|[\n\r"'])/) { JS_ESCAPE_MAP[$1] } if javascript
25
-
26
- ''
18
+ JS_ESCAPER.escape_javascript(javascript)
27
19
  end
28
20
 
29
21
  def escape(javascript)
@@ -1,3 +1,3 @@
1
1
  module Apotomo
2
- VERSION = '1.1.1'
2
+ VERSION = '1.1.2'
3
3
  end
@@ -1,7 +1,9 @@
1
- <h1>
2
- <%= class_name %>Widget#<%= @state %>
3
- </h1>
1
+ <%%= widget_div do %>
2
+ <h1>
3
+ <%= class_name %>Widget#<%= @state %>
4
+ </h1>
4
5
 
5
- <p>
6
- Find me in <%= @path %>
7
- </p>
6
+ <p>
7
+ Find me in <%= @path %>
8
+ </p>
9
+ <%% end %>
@@ -1,4 +1,5 @@
1
- %h1
2
- <%= class_name %>Widget#<%= @state %>
3
- %p
4
- Find me in <%= @path %>
1
+ = widget_div do
2
+ %h1
3
+ <%= class_name %>Widget#<%= @state %>
4
+ %p
5
+ Find me in <%= @path %>
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 1
8
- - 1
9
- version: 1.1.1
8
+ - 2
9
+ version: 1.1.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Nick Sutterer
@@ -14,25 +14,26 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-03-25 00:00:00 +01:00
17
+ date: 2011-06-15 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
- name: rails
21
+ name: cells
22
22
  prerelease: false
23
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
24
  none: false
25
25
  requirements:
26
- - - ~>
26
+ - - ">="
27
27
  - !ruby/object:Gem::Version
28
28
  segments:
29
29
  - 3
30
- - 0
31
- version: "3.0"
30
+ - 5
31
+ - 6
32
+ version: 3.5.6
32
33
  type: :runtime
33
34
  version_requirements: *id001
34
35
  - !ruby/object:Gem::Dependency
35
- name: cells
36
+ name: onfire
36
37
  prerelease: false
37
38
  requirement: &id002 !ruby/object:Gem::Requirement
38
39
  none: false
@@ -40,14 +41,14 @@ dependencies:
40
41
  - - ~>
41
42
  - !ruby/object:Gem::Version
42
43
  segments:
43
- - 3
44
- - 5
45
- - 6
46
- version: 3.5.6
44
+ - 0
45
+ - 2
46
+ - 0
47
+ version: 0.2.0
47
48
  type: :runtime
48
49
  version_requirements: *id002
49
50
  - !ruby/object:Gem::Dependency
50
- name: onfire
51
+ name: hooks
51
52
  prerelease: false
52
53
  requirement: &id003 !ruby/object:Gem::Requirement
53
54
  none: false
@@ -56,28 +57,26 @@ dependencies:
56
57
  - !ruby/object:Gem::Version
57
58
  segments:
58
59
  - 0
59
- - 2
60
- - 0
61
- version: 0.2.0
60
+ - 1
61
+ - 3
62
+ version: 0.1.3
62
63
  type: :runtime
63
64
  version_requirements: *id003
64
65
  - !ruby/object:Gem::Dependency
65
- name: hooks
66
+ name: shoulda
66
67
  prerelease: false
67
68
  requirement: &id004 !ruby/object:Gem::Requirement
68
69
  none: false
69
70
  requirements:
70
- - - ~>
71
+ - - ">="
71
72
  - !ruby/object:Gem::Version
72
73
  segments:
73
74
  - 0
74
- - 1
75
- - 3
76
- version: 0.1.3
77
- type: :runtime
75
+ version: "0"
76
+ type: :development
78
77
  version_requirements: *id004
79
78
  - !ruby/object:Gem::Dependency
80
- name: shoulda
79
+ name: slim
81
80
  prerelease: false
82
81
  requirement: &id005 !ruby/object:Gem::Requirement
83
82
  none: false
@@ -90,7 +89,7 @@ dependencies:
90
89
  type: :development
91
90
  version_requirements: *id005
92
91
  - !ruby/object:Gem::Dependency
93
- name: slim
92
+ name: haml
94
93
  prerelease: false
95
94
  requirement: &id006 !ruby/object:Gem::Requirement
96
95
  none: false