dolly 0.5.5 → 0.5.6

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: 10d7b16823e7257cea3aa54d306b932d50fbc5a6
4
- data.tar.gz: 6af968ec8a3b98ff9888d0a32ccf7e2285da5266
3
+ metadata.gz: 37d11cb189ae9798e2f378111955284068d7d040
4
+ data.tar.gz: 76051188f1787521bd8bc2c39ba7cee148977561
5
5
  SHA512:
6
- metadata.gz: 91819c57f03e5050147348b61432c3e709296066b0787f4950dd0fcb3f79cce54a24a84634f30187e5bb97e6ecae85b3a3b083e185170ff1041cea33b8ef62a2
7
- data.tar.gz: 6fc661f55dc1184f540e10a63d95f5522eec008ab04785f072d3967a5f82e75bf55dc8a3f936f44ef4d58ec7b8dc450b71aed525d2f2e9c1d01e4a0015a911ba
6
+ metadata.gz: a978202c81fb3894a93e1bad90008f68b807bb221303dbbb06448c20fb9fe31ebf1152b443c72624493397043d32485ec6b05038c53bc7ce500b1de880b0af17
7
+ data.tar.gz: df4d93f97050fbeecc591ad243fed43ecc7bf2ed13b4aa314c961da6d1587f9c84ff2648bd450c3c7e4a45dec3c5fb002a11b2c1100d04c6237ac91c67fe8d08
@@ -3,7 +3,9 @@ module Dolly
3
3
  attr_accessor :config_file
4
4
 
5
5
  def parse_config
6
- YAML::load( ERB.new( File.read(config_file) ).result)
6
+ @config_data ||= File.read(config_file)
7
+ raise Dolly::InvalidConfigFileError unless @config_data.present?
8
+ YAML::load( ERB.new(@config_data).result )
7
9
  end
8
10
 
9
11
  def env
data/lib/dolly/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dolly
2
- VERSION = "0.5.5"
2
+ VERSION = "0.5.6"
3
3
  end
@@ -14,4 +14,14 @@ module Dolly
14
14
  'Design document is missing. Add it into couchdb.yml as design:name.'
15
15
  end
16
16
  end
17
+ class InvalidConfigFileError < RuntimeError
18
+
19
+ def initialize filename
20
+ @filename = filename
21
+ end
22
+
23
+ def to_s
24
+ "Invalid config file at #{filename}"
25
+ end
26
+ end
17
27
  end
@@ -31207,3 +31207,90 @@ DocumentTest: test_with_default_will_return_default_value_on_nil
31207
31207
  -----------------------------------
31208
31208
  DocumentTest: test_with_timestamps!
31209
31209
  -----------------------------------
31210
+ --------------------------------------------------
31211
+ BulkDocumentTest: test_adding_document_to_bulk_doc
31212
+ --------------------------------------------------
31213
+ -----------------------------------------------------------------
31214
+ BulkDocumentTest: test_bulk_document_intialize_with_empty_payload
31215
+ -----------------------------------------------------------------
31216
+ ------------------------------------------------------------------
31217
+ BulkDocumentTest: test_save_document_will_remove_docs_from_payload
31218
+ ------------------------------------------------------------------
31219
+ --------------------------------------------------------------
31220
+ DocumentTest: test_Dolly::Document_have_bulk_document_instance
31221
+ --------------------------------------------------------------
31222
+ -------------------------------------------
31223
+ DocumentTest: test_all_first_returns_FooBar
31224
+ -------------------------------------------
31225
+ ------------------------------------------
31226
+ DocumentTest: test_all_last_returns_FooBar
31227
+ ------------------------------------------
31228
+ --------------------------------------
31229
+ DocumentTest: test_all_will_get_2_docs
31230
+ --------------------------------------
31231
+ ------------------------------------------------
31232
+ DocumentTest: test_all_will_get_FooBar_documents
31233
+ ------------------------------------------------
31234
+ ----------------------------------------------
31235
+ DocumentTest: test_default_will_be_avoerwriten
31236
+ ----------------------------------------------
31237
+ --------------------------------------------
31238
+ DocumentTest: test_delete_method_on_document
31239
+ --------------------------------------------
31240
+ ------------------------------------------------
31241
+ DocumentTest: test_empty_find_should_raise_error
31242
+ ------------------------------------------------
31243
+ ------------------------------------------------------------
31244
+ DocumentTest: test_error_on_server_raises_Dolly::ServerError
31245
+ ------------------------------------------------------------
31246
+ --------------------------------------------------
31247
+ DocumentTest: test_find_will_get_a_FooBar_document
31248
+ --------------------------------------------------
31249
+ ----------------------------------------------------------------
31250
+ DocumentTest: test_find_with_multiple_ids_will_return_Collection
31251
+ ----------------------------------------------------------------
31252
+ --------------------------------------------------------
31253
+ DocumentTest: test_first_class_method_returns_collection
31254
+ --------------------------------------------------------
31255
+ ---------------------------------------------------------
31256
+ DocumentTest: test_first_class_method_returns_single_item
31257
+ ---------------------------------------------------------
31258
+ ---------------------------------------------
31259
+ DocumentTest: test_getting_not_found_document
31260
+ ---------------------------------------------
31261
+ -------------------------------------------------------
31262
+ DocumentTest: test_last_class_method_returns_collection
31263
+ -------------------------------------------------------
31264
+ --------------------------------------------------------
31265
+ DocumentTest: test_last_class_method_returns_single_item
31266
+ --------------------------------------------------------
31267
+ -------------------------------------------------
31268
+ DocumentTest: test_multi_response_with_right_data
31269
+ -------------------------------------------------
31270
+ ---------------------------------------
31271
+ DocumentTest: test_new_document_have_id
31272
+ ---------------------------------------
31273
+ -----------------------------------------
31274
+ DocumentTest: test_new_in_memory_document
31275
+ -----------------------------------------
31276
+ ------------------------------------
31277
+ DocumentTest: test_query_custom_view
31278
+ ------------------------------------
31279
+ ------------------------------------------
31280
+ DocumentTest: test_soft_delete_on_document
31281
+ ------------------------------------------
31282
+ -------------------------------------------
31283
+ DocumentTest: test_will_have_key_properties
31284
+ -------------------------------------------
31285
+ --------------------------------------------------------
31286
+ DocumentTest: test_will_have_object_with_boolean?_method
31287
+ --------------------------------------------------------
31288
+ ------------------------------------------------
31289
+ DocumentTest: test_will_have_only_set_properties
31290
+ ------------------------------------------------
31291
+ ----------------------------------------------------------------
31292
+ DocumentTest: test_with_default_will_return_default_value_on_nil
31293
+ ----------------------------------------------------------------
31294
+ -----------------------------------
31295
+ DocumentTest: test_with_timestamps!
31296
+ -----------------------------------
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dolly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - javierg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-17 00:00:00.000000000 Z
11
+ date: 2014-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -189,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
189
189
  version: '0'
190
190
  requirements: []
191
191
  rubyforge_project:
192
- rubygems_version: 2.0.0
192
+ rubygems_version: 2.0.3
193
193
  signing_key:
194
194
  specification_version: 4
195
195
  summary: will write something