hocus_pocus 0.3.0 → 0.4.0

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
- SHA1:
3
- metadata.gz: eca0d66944e5a36d17491259d52e0fd076578425
4
- data.tar.gz: 9b6c14bd4bc5f261bfed810594ef31303267ec63
2
+ SHA256:
3
+ metadata.gz: c50f4663cf52a24e1af23e866e8ba90564c9ae6cd041c8a2aef7d8e6fc636ccf
4
+ data.tar.gz: 219f63589b0736115d11e761df2c88502243da4b43b81e554926a8a13fd4189e
5
5
  SHA512:
6
- metadata.gz: e05c8b8f5937608cae75370ea4ec7958e2e521d7b11b1e30a8517a3925c0f9704468ca7e4844f3af9dc8c09c4c89bf1d5498ddd0bbed6b6b2c91c57474492eed
7
- data.tar.gz: f0116cac8f20e54c9f5df6fcb374b119d6a0744b99ca447fd9dd43e0575e6ed3b10df43fee75feb4f2b66803a0194169a0f149e08d0da4271b493bf3ebc57e90
6
+ metadata.gz: 0dcb97d7aa7d4b53fb39ff5561dcb1e07b6cb0b863569ebb257ab813ccb92d0d431b25b488bc8173e3701ec872a073e77fa68a2678cad2c3bbdb048e989563a3
7
+ data.tar.gz: 598eff9be126b971a5de919c78878a598196d7a86dfed0f870c25bcb559ca8d7689624d4164d2b0f1b3a276f3f644054b34d21f07da4aec8860fd0b0e91d2e59
data/README.md ADDED
@@ -0,0 +1,118 @@
1
+ # hocus_pocus
2
+
3
+ hocus_pocus is a gem library which casts a spell on your Rails app and enables you to build your Rails app "on the fly" just like editing a Wiki.
4
+
5
+ ## Features
6
+
7
+ (this documentation is copied from an ancient [blog post](https://web.archive.org/web/20120113014943/http://blog.dio.jp/2010/12/21/hocus_pocus)).
8
+
9
+
10
+ ### 1. Request Driven Generator
11
+
12
+ You, well grounded Railers, always start your development with URL designing, right? You know, that's "the Rails Way". So, as you decide the URL, just put it in your browser's URL window.
13
+
14
+
15
+ ![](doc/assets/hp_localhost_3000.png)
16
+
17
+ This engine catches the "routing missing" sort of request, then urges you to input the parameters for the scaffold generator for the "missing" resource.
18
+
19
+ ![](doc/assets/hp_scaffold.png)
20
+
21
+ When the params are submitted, the engine kicks the scaffold generator on the server, and redirects you back to the generated index action.
22
+
23
+ ![](doc/assets/hp_scaffolded.png)
24
+
25
+ This is what I meant by "request driven". This idea is strongly inspired by "Ymir" framework, which has been developed by YOKOTA Takehiko (@i_am_skirnir) in Java language. As I took a look at this, I thought, "hey, even Java can do live code generation through browser. Why can't Rails do that?"
26
+
27
+
28
+ ### 2. View Editor
29
+
30
+ I guess you're always frustrated that you have to switch between your text editor and browser again and again while developing web apps. This engine magically enables you to edit your view file dynamically on your web browser just like a Wiki by clicking the "edit" button on the top right (this is why this product was previously called "wiki_mode" engine).
31
+
32
+ ![](doc/assets/hp_editing_show.png)
33
+
34
+ Of course you can edit the partials as well.
35
+
36
+ ![](doc/assets/hp_editing_partial.png)
37
+
38
+
39
+ ### 3. url_for-missing Driven Generator
40
+
41
+ Now, as you edit your view, you probably want to `link_to` or build a `form_for` a resource that does not exist yet, because it's a quite natural way for editing a Wiki. OK, now you can do it that way. Simply add a `link_to` like this, and submit the form.
42
+
43
+ ![](doc/assets/hp_adding_users_path.png)
44
+
45
+ Then another magic happens here. This time, the engine rescues "url_for missing" as well, and leads you to the generator again.
46
+
47
+
48
+ ### 4. Generating Nested Resources
49
+
50
+ As you put a `link_to` a nested resource like `post_comments_path(@post)`,
51
+
52
+ ![](doc/assets/hp_adding_post_comments_path.png)
53
+
54
+ the engine suggests you to generate a nested resource.
55
+
56
+ ![](doc/assets/hp_nested_scaffold.png)
57
+
58
+ This generates a perfectly working set of code with the following routes.
59
+
60
+ ```ruby
61
+ resources :posts do
62
+ resources :comments
63
+ end
64
+ ```
65
+
66
+ This is done by another library named [nested_scaffold](https://github.com/amatsuda/nested_scaffold) generator.
67
+
68
+
69
+ ### 5. Steak (Capybara) Recorder
70
+
71
+ These days we're getting familiar with writing end-to-end testing in Ruby code. In the test code, we visit a page, `fill_in` text fields, `select` value from drop downs, `click` buttons, and then `assert` values in the page body by operating a virtual browser by Ruby. But, wait. Do you test only by code? Aren't you doing exactly the same thing by hand anyway? And isn't it easier and faster to manipulate the browser than writing Ruby code? So, isn't it nice if an integration test scenario can automatically be generated while you operate your browser? This engine records what you did in your browser,
72
+
73
+ ![](doc/assets/hp_before_steak.png)
74
+
75
+ and outputs a scenario for Steak (Capybara).
76
+
77
+ ![](doc/assets/hp_steak.png)
78
+
79
+ Comparing to usual generator generated test cases, this scenario might be quite useful and practical since it uses the actual data you entered.
80
+
81
+
82
+ ### 6. Speed
83
+
84
+ This is not actually a "feature", but an unignorable benefit of this product. Every time we hit "rails" command or "rake" command on Rails 3, we're forced to wait several seconds for the Rails process to start up. However, because the generator is directly executed inside the running Rails server process, the hocus_pocus generator runs incredibly fast. When you run the generator from browser, it actually invokes
85
+
86
+ ```sh
87
+ % rails generate scaffold
88
+ % rake db:migrate
89
+ ```
90
+
91
+ and usually finishes within a second on my mac.
92
+
93
+
94
+ ## Demo
95
+
96
+ Finally, to see how it works, [here's my live demonstration video](http://www.nicovideo.jp/watch/sm12976168) at Sapporo RubyKaigi 03.
97
+
98
+ Though the talk were in japanese, I think you all can get the idea since the main part of the talk were live demo.
99
+
100
+ I know it's super buggy ATM (thus still versioned as 0.0.0), needs tons of improvement, but has a great potential to change your development style. The source code is of course available on GitHub.
101
+
102
+ Have fun!
103
+
104
+
105
+ ## Questions, Feedback
106
+
107
+ Feel free to message me on Github (amatsuda) or Twitter (@a_matsuda) ☇3☇3☇3
108
+
109
+
110
+ ## Contributing to hocus_pocus
111
+
112
+ * Fork, fix, then send me a pull request.
113
+
114
+
115
+ ## Copyright
116
+
117
+ Copyright (c) 2010- Akira Matsuda. See MIT-LICENSE for
118
+ further details.
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -10,16 +10,28 @@ module HocusPocus
10
10
  end
11
11
 
12
12
  def call(env)
13
- @app.call(env).tap do |status, headers, body|
14
- if body.is_a?(ActionDispatch::Response) && body.request.format.html?
15
- body.body = insert_text body.body, :after, /<div id="#{HocusPocus::CONTAINER}" .*?>/i, command_line_link
13
+ status, headers, body = @app.call env
14
+
15
+ if headers && headers['Content-Type']&.include?('text/html') && (env['REQUEST_PATH'] !~ %r[^/*hocus_pocus/])
16
+ case body
17
+ when ActionDispatch::Response, ActionDispatch::Response::RackBody
18
+ body = body.body
19
+ when Array
20
+ body = body[0]
16
21
  end
22
+
23
+ body.sub!(/<\/head>/i) { %Q[<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script></head>] } unless body =~ /jquery(\.min)?\.js/
24
+ body.sub!(/<div id="#{HocusPocus::CONTAINER}" .*?>/i) { %Q[#{$~}#{command_line_link}] }
25
+
26
+ [status, headers, [body]]
27
+ else
28
+ [status, headers, body]
17
29
  end
18
30
  end
19
31
 
20
32
  private
21
33
  def command_line_link
22
- %Q[<a href="#" onclick="$(this).closest('div').find('div.command_line_form').toggle()">cmd</a><div class="command_line_form" style="display:none;"><form method="post" action="/hocus_pocus/command_line/execute" data-remote="true"><input type="text" name="command" placeholder="Command?" style="width: 512px;" /><input type="submit" name="run" /></form></div>]
34
+ %Q[<a href="#" onclick="$(this).closest('div').find('div.command_line_form').toggle(); return false;">cmd</a><div class="command_line_form" style="display:none;"><form method="post" action="/hocus_pocus/command_line/execute" data-remote="true"><input type="text" name="command" placeholder="Command?" style="width: 512px;" /><input type="submit" name="run" /></form></div>]
23
35
  end
24
36
  end
25
37
  end
@@ -6,7 +6,7 @@
6
6
  <%= hidden_field_tag :path, @path %>
7
7
  <%= text_area_tag :file, @file, :size => '100x30' %>
8
8
  <div id="actions">
9
- <%= button_to_function 'Hide', "$('#__editor__').hide()", :class => "hide" %>
9
+ <%= tag(:input, type: 'button', value: 'Hide', class: 'hide', onclick: "$('#__editor__').hide()") %>
10
10
  <%= submit_tag 'Save!', :class => "save" %>
11
11
  </div>
12
12
  <% end %>
@@ -10,13 +10,26 @@ module HocusPocus
10
10
  end
11
11
 
12
12
  def call(env)
13
- @app.call(env).tap do |status, headers, body|
14
- if body.is_a?(ActionDispatch::Response) && body.request.format.html?
15
- if Thread.current[HocusPocus::Editor::VIEW_FILENAME]
16
- body.body = insert_text body.body, :after, /<div id="#{HocusPocus::CONTAINER}" .*?>/i, %Q[#{edit_link}#{partials}]
17
- Thread.current[HocusPocus::Editor::VIEW_FILENAME] = nil
18
- end
13
+ status, headers, body = @app.call env
14
+
15
+ if headers && headers['Content-Type']&.include?('text/html') && (env['REQUEST_PATH'] !~ %r[^/*hocus_pocus/])
16
+ case body
17
+ when ActionDispatch::Response, ActionDispatch::Response::RackBody
18
+ body = body.body
19
+ when Array
20
+ body = body[0]
21
+ end
22
+
23
+ if Thread.current[HocusPocus::Editor::VIEW_FILENAME]
24
+ body.sub!(/<div id="#{HocusPocus::CONTAINER}" .*?>/i) { %Q[#{$~}#{edit_link}#{partials}] }
25
+ Thread.current[HocusPocus::Editor::VIEW_FILENAME] = nil
19
26
  end
27
+
28
+ body.sub!(/<\/head>/i) { %Q[<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script></head>] } unless body =~ /jquery(\.min)?\.js/
29
+
30
+ [status, headers, [body]]
31
+ else
32
+ [status, headers, body]
20
33
  end
21
34
  end
22
35
 
@@ -6,6 +6,20 @@ module HocusPocus
6
6
  VIEW_FILENAME = :__hocus_pocus_view_filename__
7
7
  PARTIAL_FILENAMES = :__hocus_pocus_partial_filenames__
8
8
 
9
+ module PartialRendererExtension
10
+ def render_partial
11
+ (Thread.current[HocusPocus::Editor::PARTIAL_FILENAMES] ||= []) << @template unless @view.controller.class.name.starts_with?('HocusPocus::')
12
+ super
13
+ end
14
+ end
15
+
16
+ module TemplateRendererExtension
17
+ def render_template(template, layout_name = nil, locals = {})
18
+ Thread.current[HocusPocus::Editor::VIEW_FILENAME] = template.virtual_path if @view.controller.try(:request).try(:format).try(:html?) && !@view.controller.class.name.starts_with?('HocusPocus::')
19
+ super
20
+ end
21
+ end
22
+
9
23
  class Railtie < ::Rails::Railtie #:nodoc:
10
24
  initializer 'hocus_pocus.editor' do |app|
11
25
  ActiveSupport.on_load(:after_initialize) do
@@ -18,23 +32,8 @@ module HocusPocus
18
32
 
19
33
  ActiveSupport.on_load(:action_view) do
20
34
  if HocusPocus.config.enable_editor
21
- module ::ActionView
22
- class PartialRenderer
23
- def render_partial_with_filename_caching
24
- (Thread.current[HocusPocus::Editor::PARTIAL_FILENAMES] ||= []) << @template unless @view.controller.class.name.starts_with?('HocusPocus::')
25
- render_partial_without_filename_caching
26
- end
27
- alias_method_chain :render_partial, :filename_caching
28
- end
29
-
30
- class TemplateRenderer
31
- def render_template_with_filename_caching(template, layout_name = nil, locals = {})
32
- Thread.current[HocusPocus::Editor::VIEW_FILENAME] = template.virtual_path if @view.controller.try(:request).try(:format).try(:html?) && !@view.controller.class.name.starts_with?('HocusPocus::')
33
- render_template_without_filename_caching template, layout_name, locals
34
- end
35
- alias_method_chain :render_template, :filename_caching
36
- end
37
- end
35
+ ::ActionView::PartialRenderer.send :prepend, HocusPocus::Editor::PartialRendererExtension
36
+ ::ActionView::TemplateRenderer.send :prepend, HocusPocus::Editor::TemplateRendererExtension
38
37
  end
39
38
  end
40
39
  end
@@ -18,7 +18,8 @@ module HocusPocus
18
18
  # XHR
19
19
  def scaffold
20
20
  #FIXME validate params
21
- p options = params[:attr].select {|_k, v| v.present?}.map {|k, v| "#{v}:#{params[:type][k]}"}
21
+ options = []
22
+ params[:attr].select {|_k, v| v.present?}.each {|k, v| options << "#{v}:#{params[:type][k]}"}
22
23
  execute_scaffold params[:name].dup, options
23
24
  migrate
24
25
  #FIXME notice doesn't appear?
@@ -39,7 +40,12 @@ module HocusPocus
39
40
 
40
41
  # `rake db:migrate`
41
42
  def migrate
42
- ActiveRecord::Migrator.migrate(ActiveRecord::Migrator.migrations_path, ENV["VERSION"] ? ENV["VERSION"].to_i : nil)
43
+ if defined? ActiveRecord::MigrationContext # >= 5.2
44
+ ActiveRecord::Base.connection.migration_context.up(ENV["VERSION"] ? ENV["VERSION"].to_i : nil)
45
+ else
46
+ ActiveRecord::Migrator.migrate(ActiveRecord::Migrator.migrations_path, ENV["VERSION"] ? ENV["VERSION"].to_i : nil)
47
+ end
48
+
43
49
  if ActiveRecord::Base.schema_format == :ruby
44
50
  File.open(ENV['SCHEMA'] || "#{Rails.root}/db/schema.rb", "w") do |file|
45
51
  ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection, file)
@@ -3,6 +3,7 @@
3
3
  <title>generator</title>
4
4
  <%= stylesheet_link_tag 'generator' %>
5
5
  <%= javascript_include_tag 'application' %>
6
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
6
7
  <%= csrf_meta_tags %>
7
8
  <script type="text/javascript">
8
9
  $(document).on('click', '#add_attr_type', function() {
@@ -2,6 +2,11 @@ module HocusPocus
2
2
  module Generator
3
3
  class Engine < ::Rails::Engine
4
4
  isolate_namespace HocusPocus::Generator
5
+ initializer 'hocus_pocus.recorder.add middleware' do |app|
6
+ if HocusPocus.config.enable_generator
7
+ config.assets.precompile += %w(generator.css)
8
+ end
9
+ end
5
10
  end
6
11
  end
7
12
  end
@@ -8,6 +8,8 @@ module HocusPocus
8
8
  initializer 'hocus_pocus.recorder.add middleware' do |app|
9
9
  if HocusPocus.config.enable_scenario_recorder
10
10
  app.middleware.insert HocusPocus::Middleware, HocusPocus::Recorder::Middleware
11
+
12
+ app.config.assets.precompile += %w(recorder.js recorder.css)
11
13
  end
12
14
  end
13
15
  end
@@ -10,11 +10,23 @@ module HocusPocus
10
10
  end
11
11
 
12
12
  def call(env)
13
- @app.call(env).tap do |status, headers, body|
14
- if body.is_a?(ActionDispatch::Response) && body.request.format.html? && (body.request.path !~ %r[^/*hocus_pocus/])
15
- body.body = insert_text body.body, :before, /<\/head>/i, %Q[<script src="/assets/recorder.js"></script>]
16
- body.body = insert_text body.body, :after, /<div id="#{HocusPocus::CONTAINER}" .*?>/i, %Q[#{spec_link}#{spec}]
13
+ status, headers, body = @app.call env
14
+
15
+ if headers && headers['Content-Type']&.include?('text/html') && (env['REQUEST_PATH'] !~ %r[^/*hocus_pocus/])
16
+ case body
17
+ when ActionDispatch::Response, ActionDispatch::Response::RackBody
18
+ body = body.body
19
+ when Array
20
+ body = body[0]
17
21
  end
22
+
23
+ body.sub!(/<\/head>/i) { %Q[<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script></head>] } unless body =~ /jquery(\.min)?\.js/
24
+ body.sub!(/<\/head>/i) { %Q[<script src="/assets/recorder.js"></script></head>] }
25
+ body.sub!(/<div id="#{HocusPocus::CONTAINER}" .*?>/i) { %Q[#{$~}#{spec_link}#{spec}] }
26
+
27
+ [status, headers, [body]]
28
+ else
29
+ [status, headers, body]
18
30
  end
19
31
  end
20
32
 
@@ -17,7 +17,7 @@ module HocusPocus
17
17
  ActiveSupport.on_load(:action_controller) do
18
18
  if HocusPocus.config.enable_scenario_recorder
19
19
  class ::ActionController::Base
20
- before_filter HocusPocus::Recorder::Filter
20
+ before_action HocusPocus::Recorder::Filter
21
21
  end
22
22
  end
23
23
  end
data/hocus_pocus.gemspec CHANGED
@@ -12,14 +12,11 @@ Gem::Specification.new do |s|
12
12
  s.summary = 'A magical Engine that casts a spell on your Rails 3.1 app'
13
13
  s.description = 'A magical Engine that casts a spell on your Rails 3.1 app'
14
14
 
15
- s.rubyforge_project = 'hocus_pocus'
16
-
17
15
  s.files = `git ls-files`.split("\n")
18
16
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
17
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
18
  s.require_paths = ['lib', 'engines/generator/lib', 'engines/editor/lib', 'engines/recorder/lib', 'engines/command_line/lib']
21
19
 
22
- s.extra_rdoc_files = ['README.rdoc']
23
20
  s.licenses = ['MIT']
24
21
 
25
22
  s.add_runtime_dependency 'nested_scaffold', ['>= 0.1.0']
@@ -9,10 +9,21 @@ module HocusPocus
9
9
  end
10
10
 
11
11
  def call(env)
12
- @app.call(env).tap do |status, headers, body|
13
- if body.is_a?(ActionDispatch::Response) && (body.request.path !~ %r[^/*hocus_pocus/])
14
- body.body = insert_text body.body, :before, /<\/body>/i, %Q[<div id="#{HocusPocus::CONTAINER}" style="position:absolute; top:0; right: 0;"><link href="/assets/recorder.css" media="all" rel="stylesheet" type="text/css"></div>]
12
+ status, headers, body = @app.call env
13
+
14
+ if headers && headers['Content-Type']&.include?('text/html') && (env['REQUEST_PATH'] !~ %r[^/*hocus_pocus/])
15
+ case body
16
+ when ActionDispatch::Response, ActionDispatch::Response::RackBody
17
+ body = body.body
18
+ when Array
19
+ body = body[0]
15
20
  end
21
+
22
+ body.sub!(/<\/body>/i) { %Q[<div id="#{HocusPocus::CONTAINER}" style="position:absolute; top:0; right: 0;"><link href="/assets/recorder.css" media="all" rel="stylesheet" type="text/css"></div>#{$~}] }
23
+
24
+ [status, headers, [body]]
25
+ else
26
+ [status, headers, body]
16
27
  end
17
28
  end
18
29
  end
@@ -1,3 +1,3 @@
1
1
  module HocusPocus
2
- VERSION = '0.3.0'
2
+ VERSION = '0.4.0'
3
3
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hocus_pocus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akira Matsuda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-20 00:00:00.000000000 Z
11
+ date: 2019-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nested_scaffold
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.1.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.1.0
27
27
  description: A magical Engine that casts a spell on your Rails 3.1 app
@@ -29,16 +29,25 @@ email:
29
29
  - ronnie@dio.jp
30
30
  executables: []
31
31
  extensions: []
32
- extra_rdoc_files:
33
- - README.rdoc
32
+ extra_rdoc_files: []
34
33
  files:
35
- - .document
36
- - .gitignore
34
+ - ".document"
35
+ - ".gitignore"
37
36
  - CHANGELOG
38
37
  - Gemfile
39
38
  - MIT-LICENSE
40
- - README.rdoc
39
+ - README.md
41
40
  - Rakefile
41
+ - doc/assets/hp_adding_post_comments_path.png
42
+ - doc/assets/hp_adding_users_path.png
43
+ - doc/assets/hp_before_steak.png
44
+ - doc/assets/hp_editing_partial.png
45
+ - doc/assets/hp_editing_show.png
46
+ - doc/assets/hp_localhost_3000.png
47
+ - doc/assets/hp_nested_scaffold.png
48
+ - doc/assets/hp_scaffold.png
49
+ - doc/assets/hp_scaffolded.png
50
+ - doc/assets/hp_steak.png
42
51
  - engines/command_line/app/controllers/hocus_pocus/command_line/command_line_controller.rb
43
52
  - engines/command_line/app/views/hocus_pocus/command_line/command_line/execute.js.erb
44
53
  - engines/command_line/config/routes.rb
@@ -83,8 +92,6 @@ files:
83
92
  - lib/hocus_pocus/railtie.rb
84
93
  - lib/hocus_pocus/version.rb
85
94
  - lib/tasks/hocus_pocus_tasks.rake
86
- - test/helper.rb
87
- - test/test_hocus_pocus.rb
88
95
  homepage: https://github.com/amatsuda/hocus_pocus
89
96
  licenses:
90
97
  - MIT
@@ -99,20 +106,17 @@ require_paths:
99
106
  - engines/command_line/lib
100
107
  required_ruby_version: !ruby/object:Gem::Requirement
101
108
  requirements:
102
- - - '>='
109
+ - - ">="
103
110
  - !ruby/object:Gem::Version
104
111
  version: '0'
105
112
  required_rubygems_version: !ruby/object:Gem::Requirement
106
113
  requirements:
107
- - - '>='
114
+ - - ">="
108
115
  - !ruby/object:Gem::Version
109
116
  version: '0'
110
117
  requirements: []
111
- rubyforge_project: hocus_pocus
112
- rubygems_version: 2.0.3
118
+ rubygems_version: 3.0.1
113
119
  signing_key:
114
120
  specification_version: 4
115
121
  summary: A magical Engine that casts a spell on your Rails 3.1 app
116
- test_files:
117
- - test/helper.rb
118
- - test/test_hocus_pocus.rb
122
+ test_files: []
data/README.rdoc DELETED
@@ -1,20 +0,0 @@
1
- = hocus_pocus
2
-
3
- See this blog post for the details
4
- http://blog.dio.jp/2010/12/21/hocus_pocus
5
-
6
-
7
- == Questions, Feedback
8
-
9
- Feel free to message me on Github (amatsuda) or Twitter (@a_matsuda) ☇3☇3☇3
10
-
11
-
12
- == Contributing to hocus_pocus
13
-
14
- * Fork, fix, then send me a pull request.
15
-
16
-
17
- == Copyright
18
-
19
- Copyright (c) 2010-2011 Akira Matsuda. See MIT-LICENSE for
20
- further details.
data/test/helper.rb DELETED
@@ -1,18 +0,0 @@
1
- require 'rubygems'
2
- require 'bundler'
3
- begin
4
- Bundler.setup(:default, :development)
5
- rescue Bundler::BundlerError => e
6
- $stderr.puts e.message
7
- $stderr.puts "Run `bundle install` to install missing gems"
8
- exit e.status_code
9
- end
10
- require 'test/unit'
11
- require 'shoulda'
12
-
13
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
- $LOAD_PATH.unshift(File.dirname(__FILE__))
15
- require 'hocus_pocus'
16
-
17
- class Test::Unit::TestCase
18
- end
@@ -1,7 +0,0 @@
1
- require 'helper'
2
-
3
- class TestHocusPocus < Test::Unit::TestCase
4
- should "probably rename this file and start testing for real" do
5
- flunk "hey buddy, you should probably rename this file and start testing for real"
6
- end
7
- end