cartodb-rb-client 0.2.0 → 0.3.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.
data/spec/spec_helper.rb CHANGED
@@ -1,28 +1,77 @@
1
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
- $LOAD_PATH.unshift(File.dirname(__FILE__))
3
- require 'rspec'
4
- require 'yaml'
5
- require 'cartodb-rb-client'
6
- require 'cartodb-rb-client/cartodb'
7
- require 'active_support/core_ext/array/random_access.rb'
8
-
9
- CartoDB::Settings = YAML.load_file("#{File.dirname(__FILE__)}/support/cartodb_config.yml") unless defined? CartoDB::Settings
10
- CartoDB::Connection = CartoDB::Client::Connection::Base.new unless defined? CartoDB::Connection
11
- # CartoDB::Settings = YAML.load_file("#{File.dirname(__FILE__)}/support/database.yml") unless defined? CartoDB::Settings
12
- # CartoDB::Connection = CartoDB::Client::Connection::Base.new unless defined? CartoDB::Connection
13
-
14
- RgeoFactory = ::RGeo::Geographic.spherical_factory(:srid => 4326)
15
-
16
- # Requires supporting files with custom matchers and macros, etc,
17
- # in ./support/ and its subdirectories.
18
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
19
-
20
- RSpec.configure do |config|
21
- config.before(:each) do
22
- drop_all_cartodb_tables
23
- end
1
+ require 'rubygems'
2
+ require 'spork'
3
+ #uncomment the following line to use spork with the debugger
4
+ #require 'spork/ext/ruby-debug'
5
+
6
+ Spork.prefork do
7
+ # Loading more in this block will cause your tests to run faster. However,
8
+ # if you change any configuration or code from libraries loaded here, you'll
9
+ # need to restart spork for it take effect.
10
+
11
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
12
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
13
+ require 'rspec'
14
+ require 'yaml'
15
+ require 'cartodb-rb-client'
16
+ require 'cartodb-rb-client/cartodb'
17
+ require 'active_support/core_ext/array/random_access.rb'
18
+
19
+ CartoDB::Settings = YAML.load_file("#{File.dirname(__FILE__)}/support/cartodb_config.yml") unless defined? CartoDB::Settings
20
+ CartoDB::Connection = CartoDB::Client::Connection::Base.new unless defined? CartoDB::Connection
21
+ # CartoDB::Settings = YAML.load_file("#{File.dirname(__FILE__)}/support/database.yml") unless defined? CartoDB::Settings
22
+ # CartoDB::Connection = CartoDB::Client::Connection::Base.new unless defined? CartoDB::Connection
24
23
 
25
- config.after(:all) do
26
- drop_all_cartodb_tables
24
+ RgeoFactory = ::RGeo::Geographic.spherical_factory(:srid => 4326)
25
+
26
+ # Requires supporting files with custom matchers and macros, etc,
27
+ # in ./support/ and its subdirectories.
28
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
29
+
30
+ RSpec.configure do |config|
31
+ config.before(:each) do
32
+ drop_all_cartodb_tables
33
+ end
34
+
35
+ config.after(:all) do
36
+ drop_all_cartodb_tables
37
+ end
27
38
  end
28
39
  end
40
+
41
+ Spork.each_run do
42
+ # This code will be run each time you run your specs.
43
+
44
+ end
45
+
46
+ # --- Instructions ---
47
+ # Sort the contents of this file into a Spork.prefork and a Spork.each_run
48
+ # block.
49
+ #
50
+ # The Spork.prefork block is run only once when the spork server is started.
51
+ # You typically want to place most of your (slow) initializer code in here, in
52
+ # particular, require'ing any 3rd-party gems that you don't normally modify
53
+ # during development.
54
+ #
55
+ # The Spork.each_run block is run each time you run your specs. In case you
56
+ # need to load files that tend to change during development, require them here.
57
+ # With Rails, your application modules are loaded automatically, so sometimes
58
+ # this block can remain empty.
59
+ #
60
+ # Note: You can modify files loaded *from* the Spork.each_run block without
61
+ # restarting the spork server. However, this file itself will not be reloaded,
62
+ # so if you change any of the code inside the each_run block, you still need to
63
+ # restart the server. In general, if you have non-trivial code in this file,
64
+ # it's advisable to move it into a separate file so you can easily edit it
65
+ # without restarting spork. (For example, with RSpec, you could move
66
+ # non-trivial code into a file spec/support/my_helper.rb, making sure that the
67
+ # spec/support/* files are require'd from inside the each_run block.)
68
+ #
69
+ # Any code that is left outside the two blocks will be run during preforking
70
+ # *and* during each_run -- that's probably not what you want.
71
+ #
72
+ # These instructions should self-destruct in 10 seconds. If they don't, feel
73
+ # free to delete them.
74
+
75
+
76
+
77
+
@@ -0,0 +1,15 @@
1
+ #############################
2
+ # CartoDB Credentials
3
+ #############################
4
+ host:
5
+ oauth_key:
6
+ oauth_secret:
7
+ oauth_access_token:
8
+ oauth_access_token_secret:
9
+ # username:
10
+ # password:
11
+
12
+ # cache_timeout: 60
13
+ # debug: true
14
+ # ssl_peer_verification: true
15
+ # type_casting: true
Binary file