markdownable 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/.rspec +1 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +57 -0
- data/Rakefile +2 -0
- data/lib/markdownable/version.rb +3 -0
- data/lib/markdownable.rb +24 -0
- data/markdownable.gemspec +23 -0
- data/spec/dummy/.gitignore +15 -0
- data/spec/dummy/Gemfile +40 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/images/rails.png +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +15 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/mailers/.gitkeep +0 -0
- data/spec/dummy/app/models/.gitkeep +0 -0
- data/spec/dummy/app/models/article.rb +4 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config/application.rb +62 -0
- data/spec/dummy/config/boot.rb +6 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +58 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/migrate/20120807121259_create_articles.rb +11 -0
- data/spec/dummy/db/schema.rb +24 -0
- data/spec/dummy/db/seeds.rb +7 -0
- data/spec/dummy/lib/assets/.gitkeep +0 -0
- data/spec/dummy/lib/tasks/.gitkeep +0 -0
- data/spec/dummy/log/.gitkeep +0 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/public/index.html +241 -0
- data/spec/dummy/public/robots.txt +5 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/dummy/test/fixtures/.gitkeep +0 -0
- data/spec/dummy/test/fixtures/articles.yml +11 -0
- data/spec/dummy/test/functional/.gitkeep +0 -0
- data/spec/dummy/test/integration/.gitkeep +0 -0
- data/spec/dummy/test/performance/browsing_test.rb +12 -0
- data/spec/dummy/test/test_helper.rb +13 -0
- data/spec/dummy/test/unit/.gitkeep +0 -0
- data/spec/dummy/test/unit/article_test.rb +7 -0
- data/spec/dummy/vendor/assets/javascripts/.gitkeep +0 -0
- data/spec/dummy/vendor/assets/stylesheets/.gitkeep +0 -0
- data/spec/dummy/vendor/plugins/.gitkeep +0 -0
- data/spec/models/article_spec.rb +7 -0
- data/spec/poro_spec.rb +20 -0
- data/spec/spec_helper.rb +38 -0
- metadata +236 -0
File without changes
|
File without changes
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'rails/performance_test_help'
|
3
|
+
|
4
|
+
class BrowsingTest < ActionDispatch::PerformanceTest
|
5
|
+
# Refer to the documentation for all available options
|
6
|
+
# self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
|
7
|
+
# :output => 'tmp/performance', :formats => [:flat] }
|
8
|
+
|
9
|
+
def test_homepage
|
10
|
+
get '/'
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
ENV["RAILS_ENV"] = "test"
|
2
|
+
require File.expand_path('../../config/environment', __FILE__)
|
3
|
+
require 'rails/test_help'
|
4
|
+
|
5
|
+
class ActiveSupport::TestCase
|
6
|
+
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
|
7
|
+
#
|
8
|
+
# Note: You'll currently still have to declare fixtures explicitly in integration tests
|
9
|
+
# -- they do not yet inherit this setting
|
10
|
+
fixtures :all
|
11
|
+
|
12
|
+
# Add more helper methods to be used by all tests here...
|
13
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/poro_spec.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'bundler/setup'
|
2
|
+
Bundler.require
|
3
|
+
require 'rspec/autorun'
|
4
|
+
|
5
|
+
class Article
|
6
|
+
include Markdownable
|
7
|
+
attr_accessor :title, :author, :body
|
8
|
+
markdownable :body
|
9
|
+
end
|
10
|
+
|
11
|
+
describe "PORO with markdownable" do
|
12
|
+
before(:each) do
|
13
|
+
@article = Article.new
|
14
|
+
@article.title = "My Article"
|
15
|
+
@article.author = "Aaron Cruz"
|
16
|
+
@article.body = "## Hello world"
|
17
|
+
end
|
18
|
+
subject { @article }
|
19
|
+
its(:body_markdown) { should =~ /<h2>Hello world<\/h2>/ }
|
20
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
2
|
+
ENV["RAILS_ENV"] ||= 'test'
|
3
|
+
require File.expand_path("../dummy/config/environment", __FILE__)
|
4
|
+
require 'rspec/rails'
|
5
|
+
require 'rspec/autorun'
|
6
|
+
|
7
|
+
# Requires supporting ruby files with custom matchers and macros, etc,
|
8
|
+
# in spec/support/ and its subdirectories.
|
9
|
+
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
|
10
|
+
|
11
|
+
RSpec.configure do |config|
|
12
|
+
# ## Mock Framework
|
13
|
+
#
|
14
|
+
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
|
15
|
+
#
|
16
|
+
# config.mock_with :mocha
|
17
|
+
# config.mock_with :flexmock
|
18
|
+
# config.mock_with :rr
|
19
|
+
|
20
|
+
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
|
21
|
+
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
22
|
+
|
23
|
+
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
24
|
+
# examples within a transaction, remove the following line or assign false
|
25
|
+
# instead of true.
|
26
|
+
config.use_transactional_fixtures = true
|
27
|
+
|
28
|
+
# If true, the base class of anonymous controllers will be inferred
|
29
|
+
# automatically. This will be the default behavior in future versions of
|
30
|
+
# rspec-rails.
|
31
|
+
config.infer_base_class_for_anonymous_controllers = false
|
32
|
+
|
33
|
+
# Run specs in random order to surface order dependencies. If you find an
|
34
|
+
# order dependency and want to debug it, you can fix the order by providing
|
35
|
+
# the seed, which is printed after each run.
|
36
|
+
# --seed 1234
|
37
|
+
config.order = "random"
|
38
|
+
end
|
metadata
ADDED
@@ -0,0 +1,236 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: markdownable
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Aaron Cruz
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-08-07 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rails
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rspec-rails
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: sqlite3
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: redcarpet
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
description: Dynamically creates a markdown field on your classes
|
79
|
+
email:
|
80
|
+
- aaron@aaroncruz.com
|
81
|
+
executables: []
|
82
|
+
extensions: []
|
83
|
+
extra_rdoc_files: []
|
84
|
+
files:
|
85
|
+
- .gitignore
|
86
|
+
- .rspec
|
87
|
+
- Gemfile
|
88
|
+
- LICENSE
|
89
|
+
- README.md
|
90
|
+
- Rakefile
|
91
|
+
- lib/markdownable.rb
|
92
|
+
- lib/markdownable/version.rb
|
93
|
+
- markdownable.gemspec
|
94
|
+
- spec/dummy/.gitignore
|
95
|
+
- spec/dummy/Gemfile
|
96
|
+
- spec/dummy/README.rdoc
|
97
|
+
- spec/dummy/Rakefile
|
98
|
+
- spec/dummy/app/assets/images/rails.png
|
99
|
+
- spec/dummy/app/assets/javascripts/application.js
|
100
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
101
|
+
- spec/dummy/app/controllers/application_controller.rb
|
102
|
+
- spec/dummy/app/helpers/application_helper.rb
|
103
|
+
- spec/dummy/app/mailers/.gitkeep
|
104
|
+
- spec/dummy/app/models/.gitkeep
|
105
|
+
- spec/dummy/app/models/article.rb
|
106
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
107
|
+
- spec/dummy/config.ru
|
108
|
+
- spec/dummy/config/application.rb
|
109
|
+
- spec/dummy/config/boot.rb
|
110
|
+
- spec/dummy/config/database.yml
|
111
|
+
- spec/dummy/config/environment.rb
|
112
|
+
- spec/dummy/config/environments/development.rb
|
113
|
+
- spec/dummy/config/environments/production.rb
|
114
|
+
- spec/dummy/config/environments/test.rb
|
115
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
116
|
+
- spec/dummy/config/initializers/inflections.rb
|
117
|
+
- spec/dummy/config/initializers/mime_types.rb
|
118
|
+
- spec/dummy/config/initializers/secret_token.rb
|
119
|
+
- spec/dummy/config/initializers/session_store.rb
|
120
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
121
|
+
- spec/dummy/config/locales/en.yml
|
122
|
+
- spec/dummy/config/routes.rb
|
123
|
+
- spec/dummy/db/migrate/20120807121259_create_articles.rb
|
124
|
+
- spec/dummy/db/schema.rb
|
125
|
+
- spec/dummy/db/seeds.rb
|
126
|
+
- spec/dummy/lib/assets/.gitkeep
|
127
|
+
- spec/dummy/lib/tasks/.gitkeep
|
128
|
+
- spec/dummy/log/.gitkeep
|
129
|
+
- spec/dummy/public/404.html
|
130
|
+
- spec/dummy/public/422.html
|
131
|
+
- spec/dummy/public/500.html
|
132
|
+
- spec/dummy/public/favicon.ico
|
133
|
+
- spec/dummy/public/index.html
|
134
|
+
- spec/dummy/public/robots.txt
|
135
|
+
- spec/dummy/script/rails
|
136
|
+
- spec/dummy/test/fixtures/.gitkeep
|
137
|
+
- spec/dummy/test/fixtures/articles.yml
|
138
|
+
- spec/dummy/test/functional/.gitkeep
|
139
|
+
- spec/dummy/test/integration/.gitkeep
|
140
|
+
- spec/dummy/test/performance/browsing_test.rb
|
141
|
+
- spec/dummy/test/test_helper.rb
|
142
|
+
- spec/dummy/test/unit/.gitkeep
|
143
|
+
- spec/dummy/test/unit/article_test.rb
|
144
|
+
- spec/dummy/vendor/assets/javascripts/.gitkeep
|
145
|
+
- spec/dummy/vendor/assets/stylesheets/.gitkeep
|
146
|
+
- spec/dummy/vendor/plugins/.gitkeep
|
147
|
+
- spec/models/article_spec.rb
|
148
|
+
- spec/poro_spec.rb
|
149
|
+
- spec/spec_helper.rb
|
150
|
+
homepage: http://aaroncruz.com
|
151
|
+
licenses: []
|
152
|
+
post_install_message:
|
153
|
+
rdoc_options: []
|
154
|
+
require_paths:
|
155
|
+
- lib
|
156
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
157
|
+
none: false
|
158
|
+
requirements:
|
159
|
+
- - ! '>='
|
160
|
+
- !ruby/object:Gem::Version
|
161
|
+
version: '0'
|
162
|
+
segments:
|
163
|
+
- 0
|
164
|
+
hash: -3190620955287273259
|
165
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
166
|
+
none: false
|
167
|
+
requirements:
|
168
|
+
- - ! '>='
|
169
|
+
- !ruby/object:Gem::Version
|
170
|
+
version: '0'
|
171
|
+
segments:
|
172
|
+
- 0
|
173
|
+
hash: -3190620955287273259
|
174
|
+
requirements: []
|
175
|
+
rubyforge_project:
|
176
|
+
rubygems_version: 1.8.23
|
177
|
+
signing_key:
|
178
|
+
specification_version: 3
|
179
|
+
summary: Dynamically creates a markdown field on your classes
|
180
|
+
test_files:
|
181
|
+
- spec/dummy/.gitignore
|
182
|
+
- spec/dummy/Gemfile
|
183
|
+
- spec/dummy/README.rdoc
|
184
|
+
- spec/dummy/Rakefile
|
185
|
+
- spec/dummy/app/assets/images/rails.png
|
186
|
+
- spec/dummy/app/assets/javascripts/application.js
|
187
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
188
|
+
- spec/dummy/app/controllers/application_controller.rb
|
189
|
+
- spec/dummy/app/helpers/application_helper.rb
|
190
|
+
- spec/dummy/app/mailers/.gitkeep
|
191
|
+
- spec/dummy/app/models/.gitkeep
|
192
|
+
- spec/dummy/app/models/article.rb
|
193
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
194
|
+
- spec/dummy/config.ru
|
195
|
+
- spec/dummy/config/application.rb
|
196
|
+
- spec/dummy/config/boot.rb
|
197
|
+
- spec/dummy/config/database.yml
|
198
|
+
- spec/dummy/config/environment.rb
|
199
|
+
- spec/dummy/config/environments/development.rb
|
200
|
+
- spec/dummy/config/environments/production.rb
|
201
|
+
- spec/dummy/config/environments/test.rb
|
202
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
203
|
+
- spec/dummy/config/initializers/inflections.rb
|
204
|
+
- spec/dummy/config/initializers/mime_types.rb
|
205
|
+
- spec/dummy/config/initializers/secret_token.rb
|
206
|
+
- spec/dummy/config/initializers/session_store.rb
|
207
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
208
|
+
- spec/dummy/config/locales/en.yml
|
209
|
+
- spec/dummy/config/routes.rb
|
210
|
+
- spec/dummy/db/migrate/20120807121259_create_articles.rb
|
211
|
+
- spec/dummy/db/schema.rb
|
212
|
+
- spec/dummy/db/seeds.rb
|
213
|
+
- spec/dummy/lib/assets/.gitkeep
|
214
|
+
- spec/dummy/lib/tasks/.gitkeep
|
215
|
+
- spec/dummy/log/.gitkeep
|
216
|
+
- spec/dummy/public/404.html
|
217
|
+
- spec/dummy/public/422.html
|
218
|
+
- spec/dummy/public/500.html
|
219
|
+
- spec/dummy/public/favicon.ico
|
220
|
+
- spec/dummy/public/index.html
|
221
|
+
- spec/dummy/public/robots.txt
|
222
|
+
- spec/dummy/script/rails
|
223
|
+
- spec/dummy/test/fixtures/.gitkeep
|
224
|
+
- spec/dummy/test/fixtures/articles.yml
|
225
|
+
- spec/dummy/test/functional/.gitkeep
|
226
|
+
- spec/dummy/test/integration/.gitkeep
|
227
|
+
- spec/dummy/test/performance/browsing_test.rb
|
228
|
+
- spec/dummy/test/test_helper.rb
|
229
|
+
- spec/dummy/test/unit/.gitkeep
|
230
|
+
- spec/dummy/test/unit/article_test.rb
|
231
|
+
- spec/dummy/vendor/assets/javascripts/.gitkeep
|
232
|
+
- spec/dummy/vendor/assets/stylesheets/.gitkeep
|
233
|
+
- spec/dummy/vendor/plugins/.gitkeep
|
234
|
+
- spec/models/article_spec.rb
|
235
|
+
- spec/poro_spec.rb
|
236
|
+
- spec/spec_helper.rb
|