fly_parser 0.0.2 → 0.0.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fa9f3282d28363242331eda073faf2ed1712e842
4
- data.tar.gz: 15f8a0bbab80abd38dce52c64e2170476e43461d
3
+ metadata.gz: ff19dc69602beb12a94a823e29f30f19d02492ca
4
+ data.tar.gz: 85de4d751e4a4fb72ec9981bd9431fc922077274
5
5
  SHA512:
6
- metadata.gz: c916602bee1614f184e3c5b59c6199704fb7194619bdc35090f3a2f3ec04d8160166a692229b20d2d10f8299bc1ef88e4b7736e9f3532ab2e8fc89e241498b84
7
- data.tar.gz: 02e3caa318aa617489f36f244d668b210a45757f2145cb0b46559131ee5fb0e443ffcba940e14abbc8c57e10a1db8d8d2f44c6fa142530dfedaa258c9d5546e7
6
+ metadata.gz: abe1ced981403a6e81aa49847b20fa8ab401e822babc5c7ae2992832a1e8b195db6754e79e39ac8dab552ad38d62a476f31f76f00acc4b8fa1564be71cab28ea
7
+ data.tar.gz: d846b1dbc24307495ff2368256740d0eee3142b44c0b90d08ab730c4576cdb2e9d2e2897e2af82961fc045803c7ebc13a6f5c80455765e294b5a139db21e8421
data/lib/fly_parser.rb CHANGED
@@ -9,10 +9,6 @@ BASE_PATH = File.expand_path("fly_parser/base", File.dirname(__FILE__))
9
9
  LOGO_PATH = File.expand_path("fly_parser/logo.txt", File.dirname(__FILE__))
10
10
  MECHANIZE_FIX = File.expand_path("fly_parser/mechanize_fix", File.dirname(__FILE__))
11
11
 
12
- require BASE_PATH
13
- Dir.chdir RAILS_ROOT
14
- require RAILS_BOOT_PATH
15
- require RAILS_CONFIG_PATH
16
12
  Pry.config.print = proc { |output, value| output.puts value.ai }
17
13
 
18
14
  # Require all of the Ruby files in the given directory.
@@ -26,10 +22,19 @@ def require_all(path)
26
22
  require f
27
23
  end
28
24
  end
29
- require_all 'fly_parser/sources'
25
+
26
+ unless defined? Rails
27
+ require BASE_PATH
28
+ Dir.chdir RAILS_ROOT
29
+ require RAILS_BOOT_PATH
30
+ require RAILS_CONFIG_PATH
31
+ require_all 'fly_parser/sources'
32
+ end
33
+
30
34
  # fix mechanize by monkey-patching :)
31
35
  require MECHANIZE_FIX
32
36
 
37
+
33
38
  module Parser
34
39
  class << self
35
40
  # Get HTTP Source
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fly_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ruslan Korolev
@@ -125,7 +125,6 @@ files:
125
125
  - lib/fly_parser/sources/fitness.rb
126
126
  - lib/fly_parser/sources/news.rb
127
127
  - lib/fly_parser/sources/sport.rb
128
- - lib/fly_parser/version.rb
129
128
  homepage: http://rubygems.org
130
129
  licenses:
131
130
  - MIT
@@ -1,3 +0,0 @@
1
- module Parser
2
- VERSION = '0.0.1'
3
- end