active_text 0.0.8 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.rvmrc CHANGED
@@ -1 +1 @@
1
- rvm ree-1.8.7-2011.03@active_text
1
+ rvm ruby-1.9.2-p290@active_text
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.8
1
+ 0.0.9
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{active_text}
8
- s.version = "0.0.8"
8
+ s.version = "0.1.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ramon Tayag"]
12
- s.date = %q{2011-04-16}
12
+ s.date = %q{2011-07-19}
13
13
  s.description = %q{Aims to be able to read and replace "variables" in text in an active record manner. I don't claim that it behaves exactly like ActiveRecord - that is a much more complex beast than this will ever be.}
14
14
  s.email = %q{ramon@tayag.net}
15
15
  s.extra_rdoc_files = [
@@ -66,7 +66,6 @@ module ActiveText
66
66
  variable.value
67
67
  end
68
68
  else
69
- Rails.logger.debug("Could not find #{method_name} among these variables: #{@variables.inspect}")
70
69
  raise NoMethodError, %Q(Method "#{method_name}" does not exist)
71
70
  end
72
71
  end
@@ -26,7 +26,7 @@ module ActiveText
26
26
  end
27
27
 
28
28
  def value
29
- @context.each do |string|
29
+ @context.split("\n").each do |string|
30
30
  string =~ /^\${1}#{@key}: (.+);/
31
31
  return $1 if $1
32
32
  end
@@ -39,7 +39,7 @@ module ActiveText
39
39
  private
40
40
 
41
41
  def content_of(metadata)
42
- @context.each do |string|
42
+ @context.split("\n").each do |string|
43
43
  string =~ /^#{@comment} @([\w]+[^\s]) (.+)/
44
44
  return $2 if $1 == metadata
45
45
  end
metadata CHANGED
@@ -1,109 +1,82 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: active_text
3
- version: !ruby/object:Gem::Version
4
- hash: 15
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 8
10
- version: 0.0.8
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Ramon Tayag
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-04-16 00:00:00 +08:00
12
+ date: 2011-07-19 00:00:00.000000000 +08:00
19
13
  default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
22
- type: :development
23
- requirement: &id001 !ruby/object:Gem::Requirement
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rspec
17
+ requirement: &88707460 !ruby/object:Gem::Requirement
24
18
  none: false
25
- requirements:
26
- - - "="
27
- - !ruby/object:Gem::Version
28
- hash: 3
29
- segments:
30
- - 2
31
- - 3
32
- - 0
19
+ requirements:
20
+ - - =
21
+ - !ruby/object:Gem::Version
33
22
  version: 2.3.0
34
- name: rspec
35
- version_requirements: *id001
36
- prerelease: false
37
- - !ruby/object:Gem::Dependency
38
23
  type: :development
39
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ prerelease: false
25
+ version_requirements: *88707460
26
+ - !ruby/object:Gem::Dependency
27
+ name: bundler
28
+ requirement: &88707180 !ruby/object:Gem::Requirement
40
29
  none: false
41
- requirements:
30
+ requirements:
42
31
  - - ~>
43
- - !ruby/object:Gem::Version
44
- hash: 23
45
- segments:
46
- - 1
47
- - 0
48
- - 0
32
+ - !ruby/object:Gem::Version
49
33
  version: 1.0.0
50
- name: bundler
51
- version_requirements: *id002
52
- prerelease: false
53
- - !ruby/object:Gem::Dependency
54
34
  type: :development
55
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ prerelease: false
36
+ version_requirements: *88707180
37
+ - !ruby/object:Gem::Dependency
38
+ name: jeweler
39
+ requirement: &88706920 !ruby/object:Gem::Requirement
56
40
  none: false
57
- requirements:
41
+ requirements:
58
42
  - - ~>
59
- - !ruby/object:Gem::Version
60
- hash: 7
61
- segments:
62
- - 1
63
- - 5
64
- - 2
43
+ - !ruby/object:Gem::Version
65
44
  version: 1.5.2
66
- name: jeweler
67
- version_requirements: *id003
68
- prerelease: false
69
- - !ruby/object:Gem::Dependency
70
45
  type: :development
71
- requirement: &id004 !ruby/object:Gem::Requirement
72
- none: false
73
- requirements:
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- hash: 3
77
- segments:
78
- - 0
79
- version: "0"
80
- name: rcov
81
- version_requirements: *id004
82
46
  prerelease: false
83
- - !ruby/object:Gem::Dependency
84
- type: :development
85
- requirement: &id005 !ruby/object:Gem::Requirement
47
+ version_requirements: *88706920
48
+ - !ruby/object:Gem::Dependency
49
+ name: rcov
50
+ requirement: &88706660 !ruby/object:Gem::Requirement
86
51
  none: false
87
- requirements:
88
- - - ">="
89
- - !ruby/object:Gem::Version
90
- hash: 3
91
- segments:
92
- - 0
93
- version: "0"
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ type: :development
57
+ prerelease: false
58
+ version_requirements: *88706660
59
+ - !ruby/object:Gem::Dependency
94
60
  name: autotest
95
- version_requirements: *id005
61
+ requirement: &88706400 !ruby/object:Gem::Requirement
62
+ none: false
63
+ requirements:
64
+ - - ! '>='
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ type: :development
96
68
  prerelease: false
97
- description: Aims to be able to read and replace "variables" in text in an active record manner. I don't claim that it behaves exactly like ActiveRecord - that is a much more complex beast than this will ever be.
69
+ version_requirements: *88706400
70
+ description: Aims to be able to read and replace "variables" in text in an active
71
+ record manner. I don't claim that it behaves exactly like ActiveRecord - that is
72
+ a much more complex beast than this will ever be.
98
73
  email: ramon@tayag.net
99
74
  executables: []
100
-
101
75
  extensions: []
102
-
103
- extra_rdoc_files:
76
+ extra_rdoc_files:
104
77
  - LICENSE.txt
105
78
  - README.textile
106
- files:
79
+ files:
107
80
  - .document
108
81
  - .rspec
109
82
  - .rvmrc
@@ -121,38 +94,33 @@ files:
121
94
  - spec/spec_helper.rb
122
95
  has_rdoc: true
123
96
  homepage: http://github.com/ramontayag/active_text
124
- licenses:
97
+ licenses:
125
98
  - MIT
126
99
  post_install_message:
127
100
  rdoc_options: []
128
-
129
- require_paths:
101
+ require_paths:
130
102
  - lib
131
- required_ruby_version: !ruby/object:Gem::Requirement
103
+ required_ruby_version: !ruby/object:Gem::Requirement
132
104
  none: false
133
- requirements:
134
- - - ">="
135
- - !ruby/object:Gem::Version
136
- hash: 3
137
- segments:
105
+ requirements:
106
+ - - ! '>='
107
+ - !ruby/object:Gem::Version
108
+ version: '0'
109
+ segments:
138
110
  - 0
139
- version: "0"
140
- required_rubygems_version: !ruby/object:Gem::Requirement
111
+ hash: 598694289
112
+ required_rubygems_version: !ruby/object:Gem::Requirement
141
113
  none: false
142
- requirements:
143
- - - ">="
144
- - !ruby/object:Gem::Version
145
- hash: 3
146
- segments:
147
- - 0
148
- version: "0"
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
149
118
  requirements: []
150
-
151
119
  rubyforge_project:
152
120
  rubygems_version: 1.6.2
153
121
  signing_key:
154
122
  specification_version: 3
155
- summary: "ActiveText : Text as ActiveRecord : Records. Sort of."
156
- test_files:
123
+ summary: ! 'ActiveText : Text as ActiveRecord : Records. Sort of.'
124
+ test_files:
157
125
  - spec/active_text_spec.rb
158
126
  - spec/spec_helper.rb