spider_rails 3.0.0 → 4.0.0

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.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/lib/spider_rails/common.rb +12 -14
  3. data/lib/spider_rails/google_dict.rb +4 -4
  4. data/lib/spider_rails/ji_ying.rb +10 -15
  5. data/lib/spider_rails/version.rb +1 -1
  6. metadata +3 -109
  7. data/test/dummy/README.rdoc +0 -28
  8. data/test/dummy/Rakefile +0 -6
  9. data/test/dummy/app/assets/javascripts/anis.js +0 -2
  10. data/test/dummy/app/assets/javascripts/application.js +0 -13
  11. data/test/dummy/app/assets/stylesheets/anis.css +0 -4
  12. data/test/dummy/app/assets/stylesheets/application.css +0 -13
  13. data/test/dummy/app/assets/stylesheets/scaffold.css +0 -56
  14. data/test/dummy/app/controllers/anis_controller.rb +0 -58
  15. data/test/dummy/app/controllers/application_controller.rb +0 -5
  16. data/test/dummy/app/helpers/anis_helper.rb +0 -2
  17. data/test/dummy/app/helpers/application_helper.rb +0 -2
  18. data/test/dummy/app/models/ani.rb +0 -2
  19. data/test/dummy/app/views/anis/_form.html.erb +0 -25
  20. data/test/dummy/app/views/anis/edit.html.erb +0 -6
  21. data/test/dummy/app/views/anis/index.html.erb +0 -29
  22. data/test/dummy/app/views/anis/new.html.erb +0 -5
  23. data/test/dummy/app/views/anis/show.html.erb +0 -14
  24. data/test/dummy/app/views/layouts/application.html.erb +0 -14
  25. data/test/dummy/bin/bundle +0 -3
  26. data/test/dummy/bin/rails +0 -4
  27. data/test/dummy/bin/rake +0 -4
  28. data/test/dummy/config/application.rb +0 -23
  29. data/test/dummy/config/boot.rb +0 -5
  30. data/test/dummy/config/database.yml +0 -25
  31. data/test/dummy/config/environment.rb +0 -5
  32. data/test/dummy/config/environments/development.rb +0 -29
  33. data/test/dummy/config/environments/production.rb +0 -80
  34. data/test/dummy/config/environments/test.rb +0 -36
  35. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  36. data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  37. data/test/dummy/config/initializers/inflections.rb +0 -16
  38. data/test/dummy/config/initializers/mime_types.rb +0 -5
  39. data/test/dummy/config/initializers/secret_token.rb +0 -12
  40. data/test/dummy/config/initializers/session_store.rb +0 -3
  41. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  42. data/test/dummy/config/locales/en.yml +0 -23
  43. data/test/dummy/config/routes.rb +0 -56
  44. data/test/dummy/config.ru +0 -4
  45. data/test/dummy/db/development.sqlite3 +0 -0
  46. data/test/dummy/db/migrate/20130714091905_create_anis.rb +0 -10
  47. data/test/dummy/db/schema.rb +0 -23
  48. data/test/dummy/db/test.sqlite3 +0 -0
  49. data/test/dummy/log/development.log +0 -24
  50. data/test/dummy/log/test.log +0 -1153
  51. data/test/dummy/public/404.html +0 -58
  52. data/test/dummy/public/422.html +0 -58
  53. data/test/dummy/public/500.html +0 -57
  54. data/test/dummy/public/favicon.ico +0 -0
  55. data/test/dummy/tmp/pids/server.pid +0 -1
  56. data/test/ji_ying_test.rb +0 -62
  57. data/test/libpeerconnection.log +0 -0
  58. data/test/spider_rails_test.rb +0 -7
  59. data/test/test_helper.rb +0 -18
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 71a2df3105767c214ab9776e954725227028d060
4
- data.tar.gz: e57041ded0a29267bc9c708e81ea50756e583330
3
+ metadata.gz: 63f087307609e302b593faa387fd969c7243632e
4
+ data.tar.gz: 93b454e79515ce8c2a839b553305a897be598927
5
5
  SHA512:
6
- metadata.gz: 8a7f84e89c013f9c2c2539538b1a102da492b969cbc8018046377590d5a8eb9c2f5ab6fe2f464f7ddb568080db3d72e32ea94090890fd3dc1a1c676a6d5aa1a3
7
- data.tar.gz: 0753e4629a9d585b5749aca29f9f53de626e5498a94bfc85103e999baec401a3dd6ec4fa84a14bb6b5f92348ed9b9b51dc42f30e771201510dff4f07b5bfef8c
6
+ metadata.gz: 4b66c929ac8de53ae3ad6098e5c84de7d8fecee9069f856d4f0436f24b7f89f198b832945ede4f607f5d75cd15cfe804422376fc6e319f5bee7a22bc872cc387
7
+ data.tar.gz: 0a3fe1a71289756f22760cdd2febee34861cdcc0518f3cae2d4ed2258543fd82b3219225ab48e9dd0558852bffd8b53ea4b6eb0bfeeb5da3cb3e43759f928325
@@ -40,20 +40,18 @@ module Spider
40
40
 
41
41
  end
42
42
 
43
- class Browser
44
- class << self
45
- def open_browser url
46
- @browser = Watir::Browser.new :chrome, switches: %w( --user-data-dir=/home/zxr/.config/google-chrome)
47
- @browser.goto url
48
- @browser
49
- end
50
-
51
- def close_all_chromes
52
- chromes = `xdotool search 'google-chrome'`
53
- chromes = chromes.split(/\s+/)
54
- chromes.each do |chrome|
55
- `xdotool windowkill #{chrome}`
56
- end
43
+ class << self
44
+ def open_browser url
45
+ @browser = Watir::Browser.new :chrome, switches: %w( --user-data-dir=/home/zxr/.config/google-chrome)
46
+ @browser.goto url
47
+ @browser
48
+ end
49
+
50
+ def close_all_chromes
51
+ chromes = `xdotool search 'google-chrome'`
52
+ chromes = chromes.split(/\s+/)
53
+ chromes.each do |chrome|
54
+ `xdotool windowkill #{chrome}`
57
55
  end
58
56
  end
59
57
  end
@@ -38,9 +38,9 @@ module Spider
38
38
 
39
39
  def get_card keyword
40
40
  @card = Hash.new
41
- @env = open_browser "https://www.google.com.hk/search?newwindow=1&safe=strict&q=#{keyword}+define&oq=#{keyword}+define"
41
+ @page = open_browser "https://www.google.com.hk/search?newwindow=1&safe=strict&q=#{keyword}+define&oq=#{keyword}+define"
42
42
 
43
- doc = Nokogiri::HTML.parse @env.html
43
+ doc = Nokogiri::HTML.parse @page.html
44
44
 
45
45
  GoogleDict.alias_methods :card, :voice, :word, :get_content
46
46
  card(doc, 'li.dct') do |c|
@@ -51,7 +51,7 @@ module Spider
51
51
  get_explain(c)
52
52
  end
53
53
 
54
- @env.close
54
+ @page.close
55
55
  @card.delete(0)
56
56
  @card
57
57
  end
@@ -81,7 +81,7 @@ module Spider
81
81
  #end
82
82
 
83
83
  def element?(selector, &block)
84
- e = @env.element(css: selector)
84
+ e = @page.element(css: selector)
85
85
  if yield e
86
86
  else
87
87
  'element is nil'
@@ -1,10 +1,11 @@
1
1
  module Spider
2
2
  class JiYing < Common
3
- attr_accessor :ani
3
+ attr_accessor :ani, :anis
4
4
 
5
- def initialize environment
5
+ def initialize page
6
6
  @ani = Hash.new
7
- @env = environment
7
+ @anis = Array.new
8
+ @page = page
8
9
  end
9
10
 
10
11
  def full_site
@@ -19,12 +20,12 @@ module Spider
19
20
  end
20
21
 
21
22
  def final_page
22
- @env.element(css: '.title h2 a').text[/\(.+\)/].gsub!(/\(|\)/, '').to_i/100 + 1
23
+ @page.element(css: '.title h2 a').text[/\(.+\)/].gsub!(/\(|\)/, '').to_i/100 + 1
23
24
  end
24
25
 
25
26
  def full_page page_num
26
- @env.goto "http://bt.ktxp.com/search.php?keyword=%E8%AF%B8%E7%A5%9E&sort_id=28&field=title&order=&page=#{page_num}"
27
- html = Nokogiri::HTML.parse @env.html
27
+ @page.goto "http://bt.ktxp.com/search.php?keyword=%E8%AF%B8%E7%A5%9E&sort_id=28&field=title&order=&page=#{page_num}"
28
+ html = Nokogiri::HTML.parse @page.html
28
29
  html.css('.ltext').each do |td|
29
30
  single(td)
30
31
  end
@@ -32,8 +33,7 @@ module Spider
32
33
 
33
34
  def single element
34
35
  get(element)
35
- single_filter
36
- save Ani
36
+ @anis << single_filter
37
37
  end
38
38
 
39
39
  def get(element)
@@ -46,19 +46,14 @@ module Spider
46
46
  @ani
47
47
  end
48
48
 
49
- def save model_name
50
- if @ani[:title]
51
- model_name.create(title: @ani[:title], torrent: @ani[:torrent])
52
- end
53
- end
54
-
55
49
  def single_filter
56
50
  if @ani[:title][/外挂/u]
57
- @ani[:torrent].prepend('http://bt.ktxp.com')
51
+ @ani[:torrent].prepend('http://bt.ktxp.com') if @ani[:torrent]
58
52
  else
59
53
  @ani[:title] = nil
60
54
  end
61
55
 
56
+ @ani if @ani
62
57
  end
63
58
  end
64
59
  end
@@ -1,3 +1,3 @@
1
1
  module SpiderRails
2
- VERSION = "3.0.0"
2
+ VERSION = "4.0.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spider_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - zhuxingruo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-15 00:00:00.000000000 Z
11
+ date: 2013-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -57,59 +57,6 @@ files:
57
57
  - MIT-LICENSE
58
58
  - Rakefile
59
59
  - README.rdoc
60
- - test/test_helper.rb
61
- - test/libpeerconnection.log
62
- - test/spider_rails_test.rb
63
- - test/dummy/bin/bundle
64
- - test/dummy/bin/rails
65
- - test/dummy/bin/rake
66
- - test/dummy/tmp/pids/server.pid
67
- - test/dummy/config.ru
68
- - test/dummy/app/models/ani.rb
69
- - test/dummy/app/helpers/anis_helper.rb
70
- - test/dummy/app/helpers/application_helper.rb
71
- - test/dummy/app/assets/stylesheets/scaffold.css
72
- - test/dummy/app/assets/stylesheets/application.css
73
- - test/dummy/app/assets/stylesheets/anis.css
74
- - test/dummy/app/assets/javascripts/anis.js
75
- - test/dummy/app/assets/javascripts/application.js
76
- - test/dummy/app/controllers/application_controller.rb
77
- - test/dummy/app/controllers/anis_controller.rb
78
- - test/dummy/app/views/anis/_form.html.erb
79
- - test/dummy/app/views/anis/edit.html.erb
80
- - test/dummy/app/views/anis/index.html.erb
81
- - test/dummy/app/views/anis/show.html.erb
82
- - test/dummy/app/views/anis/new.html.erb
83
- - test/dummy/app/views/layouts/application.html.erb
84
- - test/dummy/config/routes.rb
85
- - test/dummy/config/environments/test.rb
86
- - test/dummy/config/environments/production.rb
87
- - test/dummy/config/environments/development.rb
88
- - test/dummy/config/boot.rb
89
- - test/dummy/config/database.yml
90
- - test/dummy/config/application.rb
91
- - test/dummy/config/initializers/secret_token.rb
92
- - test/dummy/config/initializers/backtrace_silencers.rb
93
- - test/dummy/config/initializers/inflections.rb
94
- - test/dummy/config/initializers/mime_types.rb
95
- - test/dummy/config/initializers/wrap_parameters.rb
96
- - test/dummy/config/initializers/session_store.rb
97
- - test/dummy/config/initializers/filter_parameter_logging.rb
98
- - test/dummy/config/environment.rb
99
- - test/dummy/config/locales/en.yml
100
- - test/dummy/log/development.log
101
- - test/dummy/log/test.log
102
- - test/dummy/public/422.html
103
- - test/dummy/public/404.html
104
- - test/dummy/public/500.html
105
- - test/dummy/public/favicon.ico
106
- - test/dummy/Rakefile
107
- - test/dummy/README.rdoc
108
- - test/dummy/db/migrate/20130714091905_create_anis.rb
109
- - test/dummy/db/development.sqlite3
110
- - test/dummy/db/schema.rb
111
- - test/dummy/db/test.sqlite3
112
- - test/ji_ying_test.rb
113
60
  homepage: http://zxr.baidu.com
114
61
  licenses: []
115
62
  metadata: {}
@@ -133,57 +80,4 @@ rubygems_version: 2.0.5
133
80
  signing_key:
134
81
  specification_version: 4
135
82
  summary: nil
136
- test_files:
137
- - test/test_helper.rb
138
- - test/libpeerconnection.log
139
- - test/spider_rails_test.rb
140
- - test/dummy/bin/bundle
141
- - test/dummy/bin/rails
142
- - test/dummy/bin/rake
143
- - test/dummy/tmp/pids/server.pid
144
- - test/dummy/config.ru
145
- - test/dummy/app/models/ani.rb
146
- - test/dummy/app/helpers/anis_helper.rb
147
- - test/dummy/app/helpers/application_helper.rb
148
- - test/dummy/app/assets/stylesheets/scaffold.css
149
- - test/dummy/app/assets/stylesheets/application.css
150
- - test/dummy/app/assets/stylesheets/anis.css
151
- - test/dummy/app/assets/javascripts/anis.js
152
- - test/dummy/app/assets/javascripts/application.js
153
- - test/dummy/app/controllers/application_controller.rb
154
- - test/dummy/app/controllers/anis_controller.rb
155
- - test/dummy/app/views/anis/_form.html.erb
156
- - test/dummy/app/views/anis/edit.html.erb
157
- - test/dummy/app/views/anis/index.html.erb
158
- - test/dummy/app/views/anis/show.html.erb
159
- - test/dummy/app/views/anis/new.html.erb
160
- - test/dummy/app/views/layouts/application.html.erb
161
- - test/dummy/config/routes.rb
162
- - test/dummy/config/environments/test.rb
163
- - test/dummy/config/environments/production.rb
164
- - test/dummy/config/environments/development.rb
165
- - test/dummy/config/boot.rb
166
- - test/dummy/config/database.yml
167
- - test/dummy/config/application.rb
168
- - test/dummy/config/initializers/secret_token.rb
169
- - test/dummy/config/initializers/backtrace_silencers.rb
170
- - test/dummy/config/initializers/inflections.rb
171
- - test/dummy/config/initializers/mime_types.rb
172
- - test/dummy/config/initializers/wrap_parameters.rb
173
- - test/dummy/config/initializers/session_store.rb
174
- - test/dummy/config/initializers/filter_parameter_logging.rb
175
- - test/dummy/config/environment.rb
176
- - test/dummy/config/locales/en.yml
177
- - test/dummy/log/development.log
178
- - test/dummy/log/test.log
179
- - test/dummy/public/422.html
180
- - test/dummy/public/404.html
181
- - test/dummy/public/500.html
182
- - test/dummy/public/favicon.ico
183
- - test/dummy/Rakefile
184
- - test/dummy/README.rdoc
185
- - test/dummy/db/migrate/20130714091905_create_anis.rb
186
- - test/dummy/db/development.sqlite3
187
- - test/dummy/db/schema.rb
188
- - test/dummy/db/test.sqlite3
189
- - test/ji_ying_test.rb
83
+ test_files: []
@@ -1,28 +0,0 @@
1
- == README
2
-
3
- This README would normally document whatever steps are necessary to get the
4
- application up and running.
5
-
6
- Things you may want to cover:
7
-
8
- * Ruby version
9
-
10
- * System dependencies
11
-
12
- * Configuration
13
-
14
- * Database creation
15
-
16
- * Database initialization
17
-
18
- * How to run the test suite
19
-
20
- * Services (job queues, cache servers, search engines, etc.)
21
-
22
- * Deployment instructions
23
-
24
- * ...
25
-
26
-
27
- Please feel free to use a different markup language if you do not plan to run
28
- <tt>rake doc:app</tt>.
data/test/dummy/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- # Add your own tasks in files placed in lib/tasks ending in .rake,
2
- # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
-
4
- require File.expand_path('../config/application', __FILE__)
5
-
6
- Dummy::Application.load_tasks
@@ -1,2 +0,0 @@
1
- // Place all the behaviors and hooks related to the matching controller here.
2
- // All this logic will automatically be available in application.js.
@@ -1,13 +0,0 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
3
- //
4
- // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
- //
7
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // compiled file.
9
- //
10
- // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
- // about supported directives.
12
- //
13
- //= require_tree .
@@ -1,4 +0,0 @@
1
- /*
2
- Place all the styles related to the matching controller here.
3
- They will automatically be included in application.css.
4
- */
@@ -1,13 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the top of the
9
- * compiled file, but it's generally better to create a new file per style scope.
10
- *
11
- *= require_self
12
- *= require_tree .
13
- */
@@ -1,56 +0,0 @@
1
- body { background-color: #fff; color: #333; }
2
-
3
- body, p, ol, ul, td {
4
- font-family: verdana, arial, helvetica, sans-serif;
5
- font-size: 13px;
6
- line-height: 18px;
7
- }
8
-
9
- pre {
10
- background-color: #eee;
11
- padding: 10px;
12
- font-size: 11px;
13
- }
14
-
15
- a { color: #000; }
16
- a:visited { color: #666; }
17
- a:hover { color: #fff; background-color:#000; }
18
-
19
- div.field, div.actions {
20
- margin-bottom: 10px;
21
- }
22
-
23
- #notice {
24
- color: green;
25
- }
26
-
27
- .field_with_errors {
28
- padding: 2px;
29
- background-color: red;
30
- display: table;
31
- }
32
-
33
- #error_explanation {
34
- width: 450px;
35
- border: 2px solid red;
36
- padding: 7px;
37
- padding-bottom: 0;
38
- margin-bottom: 20px;
39
- background-color: #f0f0f0;
40
- }
41
-
42
- #error_explanation h2 {
43
- text-align: left;
44
- font-weight: bold;
45
- padding: 5px 5px 5px 15px;
46
- font-size: 12px;
47
- margin: -7px;
48
- margin-bottom: 0px;
49
- background-color: #c00;
50
- color: #fff;
51
- }
52
-
53
- #error_explanation ul li {
54
- font-size: 12px;
55
- list-style: square;
56
- }
@@ -1,58 +0,0 @@
1
- class AnisController < ApplicationController
2
- before_action :set_ani, only: [:show, :edit, :update, :destroy]
3
-
4
- # GET /anis
5
- def index
6
- @anis = Ani.all
7
- end
8
-
9
- # GET /anis/1
10
- def show
11
- end
12
-
13
- # GET /anis/new
14
- def new
15
- @ani = Ani.new
16
- end
17
-
18
- # GET /anis/1/edit
19
- def edit
20
- end
21
-
22
- # POST /anis
23
- def create
24
- @ani = Ani.new(ani_params)
25
-
26
- if @ani.save
27
- redirect_to @ani, notice: 'Ani was successfully created.'
28
- else
29
- render action: 'new'
30
- end
31
- end
32
-
33
- # PATCH/PUT /anis/1
34
- def update
35
- if @ani.update(ani_params)
36
- redirect_to @ani, notice: 'Ani was successfully updated.'
37
- else
38
- render action: 'edit'
39
- end
40
- end
41
-
42
- # DELETE /anis/1
43
- def destroy
44
- @ani.destroy
45
- redirect_to anis_url, notice: 'Ani was successfully destroyed.'
46
- end
47
-
48
- private
49
- # Use callbacks to share common setup or constraints between actions.
50
- def set_ani
51
- @ani = Ani.find(params[:id])
52
- end
53
-
54
- # Only allow a trusted parameter "white list" through.
55
- def ani_params
56
- params.require(:ani).permit(:title, :torrent)
57
- end
58
- end
@@ -1,5 +0,0 @@
1
- class ApplicationController < ActionController::Base
2
- # Prevent CSRF attacks by raising an exception.
3
- # For APIs, you may want to use :null_session instead.
4
- protect_from_forgery with: :exception
5
- end
@@ -1,2 +0,0 @@
1
- module AnisHelper
2
- end
@@ -1,2 +0,0 @@
1
- module ApplicationHelper
2
- end
@@ -1,2 +0,0 @@
1
- class Ani < ActiveRecord::Base
2
- end
@@ -1,25 +0,0 @@
1
- <%= form_for(@ani) do |f| %>
2
- <% if @ani.errors.any? %>
3
- <div id="error_explanation">
4
- <h2><%= pluralize(@ani.errors.count, "error") %> prohibited this ani from being saved:</h2>
5
-
6
- <ul>
7
- <% @ani.errors.full_messages.each do |msg| %>
8
- <li><%= msg %></li>
9
- <% end %>
10
- </ul>
11
- </div>
12
- <% end %>
13
-
14
- <div class="field">
15
- <%= f.label :title %><br>
16
- <%= f.text_field :title %>
17
- </div>
18
- <div class="field">
19
- <%= f.label :torrent %><br>
20
- <%= f.text_field :torrent %>
21
- </div>
22
- <div class="actions">
23
- <%= f.submit %>
24
- </div>
25
- <% end %>
@@ -1,6 +0,0 @@
1
- <h1>Editing ani</h1>
2
-
3
- <%= render 'form' %>
4
-
5
- <%= link_to 'Show', @ani %> |
6
- <%= link_to 'Back', anis_path %>
@@ -1,29 +0,0 @@
1
- <h1>Listing anis</h1>
2
-
3
- <table>
4
- <thead>
5
- <tr>
6
- <th>Title</th>
7
- <th>Torrent</th>
8
- <th></th>
9
- <th></th>
10
- <th></th>
11
- </tr>
12
- </thead>
13
-
14
- <tbody>
15
- <% @anis.each do |ani| %>
16
- <tr>
17
- <td><%= ani.title %></td>
18
- <td><%= ani.torrent %></td>
19
- <td><%= link_to 'Show', ani %></td>
20
- <td><%= link_to 'Edit', edit_ani_path(ani) %></td>
21
- <td><%= link_to 'Destroy', ani, method: :delete, data: { confirm: 'Are you sure?' } %></td>
22
- </tr>
23
- <% end %>
24
- </tbody>
25
- </table>
26
-
27
- <br>
28
-
29
- <%= link_to 'New Ani', new_ani_path %>
@@ -1,5 +0,0 @@
1
- <h1>New ani</h1>
2
-
3
- <%= render 'form' %>
4
-
5
- <%= link_to 'Back', anis_path %>
@@ -1,14 +0,0 @@
1
- <p id="notice"><%= notice %></p>
2
-
3
- <p>
4
- <strong>Title:</strong>
5
- <%= @ani.title %>
6
- </p>
7
-
8
- <p>
9
- <strong>Torrent:</strong>
10
- <%= @ani.torrent %>
11
- </p>
12
-
13
- <%= link_to 'Edit', edit_ani_path(@ani) %> |
14
- <%= link_to 'Back', anis_path %>
@@ -1,14 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Dummy</title>
5
- <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
6
- <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
7
- <%= csrf_meta_tags %>
8
- </head>
9
- <body>
10
-
11
- <%= yield %>
12
-
13
- </body>
14
- </html>
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
- load Gem.bin_path('bundler', 'bundle')
data/test/dummy/bin/rails DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
- APP_PATH = File.expand_path('../../config/application', __FILE__)
3
- require_relative '../config/boot'
4
- require 'rails/commands'
data/test/dummy/bin/rake DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require_relative '../config/boot'
3
- require 'rake'
4
- Rake.application.run
@@ -1,23 +0,0 @@
1
- require File.expand_path('../boot', __FILE__)
2
-
3
- require 'rails/all'
4
-
5
- Bundler.require(*Rails.groups)
6
- require "spider_rails"
7
-
8
- module Dummy
9
- class Application < Rails::Application
10
- # Settings in config/environments/* take precedence over those specified here.
11
- # Application configuration should go into files in config/initializers
12
- # -- all .rb files in that directory are automatically loaded.
13
-
14
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
15
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
16
- # config.time_zone = 'Central Time (US & Canada)'
17
-
18
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
19
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
20
- # config.i18n.default_locale = :de
21
- end
22
- end
23
-
@@ -1,5 +0,0 @@
1
- # Set up gems listed in the Gemfile.
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
3
-
4
- require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
5
- $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
@@ -1,25 +0,0 @@
1
- # SQLite version 3.x
2
- # gem install sqlite3
3
- #
4
- # Ensure the SQLite 3 gem is defined in your Gemfile
5
- # gem 'sqlite3'
6
- development:
7
- adapter: sqlite3
8
- database: db/development.sqlite3
9
- pool: 5
10
- timeout: 5000
11
-
12
- # Warning: The database defined as "test" will be erased and
13
- # re-generated from your development database when you run "rake".
14
- # Do not set this db to the same as development or production.
15
- test:
16
- adapter: sqlite3
17
- database: db/test.sqlite3
18
- pool: 5
19
- timeout: 5000
20
-
21
- production:
22
- adapter: sqlite3
23
- database: db/production.sqlite3
24
- pool: 5
25
- timeout: 5000