CloudSesame 0.6.8 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/.editorconfig +12 -0
  3. data/.gitignore +1 -1
  4. data/Gemfile.lock +13 -13
  5. data/Guardfile +1 -0
  6. data/cloud_sesame.gemspec +2 -2
  7. data/coverage/.last_run.json +1 -1
  8. data/coverage/.resultset.json +679 -591
  9. data/lib/cloud_sesame/config/credential.rb +6 -6
  10. data/lib/cloud_sesame/context.rb +0 -5
  11. data/lib/cloud_sesame/domain/base.rb +147 -128
  12. data/lib/cloud_sesame/domain/client.rb +25 -25
  13. data/lib/cloud_sesame/domain/client_module/caching/base.rb +19 -23
  14. data/lib/cloud_sesame/domain/client_module/caching/no_cache.rb +11 -11
  15. data/lib/cloud_sesame/domain/client_module/caching/rails_cache.rb +32 -28
  16. data/lib/cloud_sesame/domain/client_module/caching.rb +19 -28
  17. data/lib/cloud_sesame/domain/client_module/retry.rb +6 -6
  18. data/lib/cloud_sesame/domain/config.rb +6 -6
  19. data/lib/cloud_sesame/query/ast/abstract/multi_expression_operator.rb +37 -0
  20. data/lib/cloud_sesame/query/ast/abstract/operator.rb +27 -0
  21. data/lib/cloud_sesame/query/ast/abstract/single_expression_operator.rb +39 -0
  22. data/lib/cloud_sesame/query/ast/abstract/value.rb +88 -0
  23. data/lib/cloud_sesame/query/ast/and.rb +1 -1
  24. data/lib/cloud_sesame/query/ast/date_value.rb +19 -3
  25. data/lib/cloud_sesame/query/ast/literal.rb +13 -28
  26. data/lib/cloud_sesame/query/ast/near.rb +4 -4
  27. data/lib/cloud_sesame/query/ast/not.rb +6 -7
  28. data/lib/cloud_sesame/query/ast/numeric_value.rb +20 -12
  29. data/lib/cloud_sesame/query/ast/or.rb +1 -1
  30. data/lib/cloud_sesame/query/ast/phrase.rb +1 -1
  31. data/lib/cloud_sesame/query/ast/prefix.rb +1 -1
  32. data/lib/cloud_sesame/query/ast/range_value.rb +40 -39
  33. data/lib/cloud_sesame/query/ast/root.rb +2 -6
  34. data/lib/cloud_sesame/query/ast/string_value.rb +26 -0
  35. data/lib/cloud_sesame/query/ast/term.rb +1 -1
  36. data/lib/cloud_sesame/query/ast/value.rb +25 -54
  37. data/lib/cloud_sesame/query/builder.rb +83 -54
  38. data/lib/cloud_sesame/query/domain/block.rb +3 -1
  39. data/lib/cloud_sesame/query/dsl/applied_filter_query.rb +14 -23
  40. data/lib/cloud_sesame/query/dsl/field_accessors.rb +25 -22
  41. data/lib/cloud_sesame/query/dsl/field_array_methods.rb +1 -1
  42. data/lib/cloud_sesame/query/dsl/inspect_method.rb +31 -0
  43. data/lib/cloud_sesame/query/dsl/sort_methods.rb +5 -4
  44. data/lib/cloud_sesame/query/node/abstract.rb +1 -2
  45. data/lib/cloud_sesame/query/node/facet.rb +1 -5
  46. data/lib/cloud_sesame/query/node/filter_query.rb +15 -2
  47. data/lib/cloud_sesame/query/node/fuzziness.rb +4 -3
  48. data/lib/cloud_sesame/query/node/page.rb +2 -2
  49. data/lib/cloud_sesame/query/node/query.rb +4 -17
  50. data/lib/cloud_sesame/query/node/query_options.rb +6 -16
  51. data/lib/cloud_sesame/query/node/query_options_field.rb +3 -1
  52. data/lib/cloud_sesame/query/node/query_parser.rb +8 -10
  53. data/lib/cloud_sesame/query/node/request.rb +57 -31
  54. data/lib/cloud_sesame/query/node/sort.rb +25 -11
  55. data/lib/cloud_sesame.rb +15 -12
  56. data/lib/{abstract_object.rb → services/abstract_object.rb} +0 -0
  57. data/lib/services/class_specific.rb +44 -0
  58. data/lib/services/lazy_object.rb +19 -0
  59. data/spec/cloud_sesame/domain/base_spec.rb +26 -11
  60. data/spec/cloud_sesame/domain/client_module/caching/base_spec.rb +2 -1
  61. data/spec/cloud_sesame/domain/client_module/caching/no_cache_spec.rb +2 -3
  62. data/spec/cloud_sesame/domain/client_module/caching/rails_cache_spec.rb +6 -6
  63. data/spec/cloud_sesame/domain/client_module/caching_spec.rb +33 -32
  64. data/spec/cloud_sesame/query/ast/abstract/multi_expression_operator_spec.rb +67 -0
  65. data/spec/cloud_sesame/query/ast/abstract/operator_spec.rb +29 -0
  66. data/spec/cloud_sesame/query/ast/abstract/single_expression_operator_spec.rb +70 -0
  67. data/spec/cloud_sesame/query/ast/abstract/value_spec.rb +118 -0
  68. data/spec/cloud_sesame/query/ast/and_spec.rb +1 -1
  69. data/spec/cloud_sesame/query/ast/or_spec.rb +1 -1
  70. data/spec/cloud_sesame/query/ast/range_value_spec.rb +5 -11
  71. data/spec/cloud_sesame/query/builder_spec.rb +10 -4
  72. data/spec/cloud_sesame/query/domain/block_spec.rb +15 -8
  73. data/spec/cloud_sesame/query/dsl/{block_methods_spec.rb → block_styled_operators_spec.rb} +0 -0
  74. data/spec/cloud_sesame/query/dsl/field_accessors_spec.rb +88 -50
  75. data/spec/cloud_sesame/query/dsl/field_array_methods_spec.rb +0 -2
  76. data/spec/cloud_sesame/query/node/facet_spec.rb +1 -15
  77. data/spec/cloud_sesame/query/node/filter_query_spec.rb +16 -2
  78. data/spec/cloud_sesame/query/node/page_spec.rb +3 -2
  79. data/spec/cloud_sesame/query/node/query_options_spec.rb +1 -1
  80. data/spec/cloud_sesame/query/node/query_parser_spec.rb +1 -7
  81. data/spec/cloud_sesame/query/node/query_spec.rb +10 -28
  82. data/spec/cloud_sesame/query/node/sort_spec.rb +19 -28
  83. data/spec/cloud_sesame_spec.rb +2 -156
  84. data/spec/helpers/benchmark_helper.rb +12 -0
  85. data/spec/integration/filter_query_spec.rb +0 -0
  86. data/spec/profiling_spec.rb +155 -0
  87. data/spec/{abstract_object_spec.rb → services/abstract_object_spec.rb} +0 -0
  88. data/spec/services/class_specific_spec.rb +135 -0
  89. data/spec/spec_helper.rb +3 -0
  90. metadata +32 -22
  91. data/lib/active_support/core_ext/object/deep_dup.rb +0 -53
  92. data/lib/active_support/core_ext/object/duplicable.rb +0 -98
  93. data/lib/cloud_sesame/query/ast/multi_expression_operator.rb +0 -35
  94. data/lib/cloud_sesame/query/ast/operator.rb +0 -25
  95. data/lib/cloud_sesame/query/ast/single_expression_operator.rb +0 -35
  96. data/lib/cloud_sesame/query/scope.rb +0 -21
  97. data/profiler.rb +0 -91
  98. data/spec/cloud_sesame/query/ast/multi_expression_operator_spec.rb +0 -76
  99. data/spec/cloud_sesame/query/ast/operator_spec.rb +0 -29
  100. data/spec/cloud_sesame/query/ast/single_expression_operator_spec.rb +0 -78
  101. data/spec/context_spec.rb +0 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3e1c97d77f436e2244da517b5ee9bdb7ebe53c2b
4
- data.tar.gz: 2d50778f93dd04fb38f83031828d9cc013ff9e34
3
+ metadata.gz: 391aea6f0d80218d808cce940474f60fe17a659b
4
+ data.tar.gz: 47acdfb5637966e146e93d0c372aff1678af71c0
5
5
  SHA512:
6
- metadata.gz: b6b3c168fa7ca0e47e984c55e79ea34be8c7dd02a0599853d00afa87198e105d1782a8279844a516b2960e8d82b0755df9fe405c274984674dc65111524f815a
7
- data.tar.gz: 7ab1307b9580a53707ef9f67e457072f2730f9c806967d915f4c2e772b5a73265a104cd4f25524e764f8e8e33792dd0ce497b3d297c03b0ddb039b53cbe8b5a6
6
+ metadata.gz: 26166050959a1f53ab80f2c5ac001bfb6e52828ea76dc8a9652f43373c64ad62b5caeb78a7c6be08d6f46db7af9916896c47d73e240a302d1bd674d143c18a68
7
+ data.tar.gz: 6d8ed2970e56730d83058354ec177a5c72f72a4c7db2d8852d632f6d780bf30ac3d58c41b823f778c238f73079685daecfdd3ec56035d7bb8f6aa273ade33d04
data/.editorconfig ADDED
@@ -0,0 +1,12 @@
1
+ root = true
2
+
3
+ [*]
4
+ indent_style = space
5
+ indent_size = 2
6
+ end_of_line = lf
7
+ charset = utf-8
8
+ trim_trailing_whitespace = true
9
+ insert_final_newline = true
10
+
11
+ [*.md]
12
+ trim_trailing_whitespace = false
data/.gitignore CHANGED
@@ -1,6 +1,6 @@
1
1
  *.gem
2
2
  aws.yml
3
- /tmp
3
+ tmp
4
4
  **/*.DS_Store
5
5
 
6
6
 
data/Gemfile.lock CHANGED
@@ -1,22 +1,22 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- CloudSesame (0.6.8)
4
+ CloudSesame (0.7.0)
5
5
  aws-sdk (~> 2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
10
  ast (2.2.0)
11
- aws-sdk (2.2.16)
12
- aws-sdk-resources (= 2.2.16)
13
- aws-sdk-core (2.2.16)
11
+ aws-sdk (2.2.26)
12
+ aws-sdk-resources (= 2.2.26)
13
+ aws-sdk-core (2.2.26)
14
14
  jmespath (~> 1.0)
15
- aws-sdk-resources (2.2.16)
16
- aws-sdk-core (= 2.2.16)
17
- codeclimate-test-reporter (0.4.8)
15
+ aws-sdk-resources (2.2.26)
16
+ aws-sdk-core (= 2.2.26)
17
+ codeclimate-test-reporter (0.5.0)
18
18
  simplecov (>= 0.7.1, < 1.0.0)
19
- coderay (1.1.0)
19
+ coderay (1.1.1)
20
20
  diff-lcs (1.2.5)
21
21
  docile (1.1.5)
22
22
  ffi (1.9.10)
@@ -64,7 +64,7 @@ GEM
64
64
  rspec-core (~> 3.4.0)
65
65
  rspec-expectations (~> 3.4.0)
66
66
  rspec-mocks (~> 3.4.0)
67
- rspec-core (3.4.2)
67
+ rspec-core (3.4.4)
68
68
  rspec-support (~> 3.4.0)
69
69
  rspec-expectations (3.4.0)
70
70
  diff-lcs (>= 1.2.0, < 2.0)
@@ -73,12 +73,12 @@ GEM
73
73
  diff-lcs (>= 1.2.0, < 2.0)
74
74
  rspec-support (~> 3.4.0)
75
75
  rspec-support (3.4.1)
76
- rubocop (0.37.2)
77
- parser (>= 2.3.0.4, < 3.0)
76
+ rubocop (0.38.0)
77
+ parser (>= 2.3.0.6, < 3.0)
78
78
  powerpack (~> 0.1)
79
79
  rainbow (>= 1.99.1, < 3.0)
80
80
  ruby-progressbar (~> 1.7)
81
- unicode-display_width (~> 0.3)
81
+ unicode-display_width (~> 1.0, >= 1.0.1)
82
82
  ruby-prof (0.15.9)
83
83
  ruby-progressbar (1.7.5)
84
84
  shellany (0.0.1)
@@ -89,7 +89,7 @@ GEM
89
89
  simplecov-html (0.10.0)
90
90
  slop (3.6.0)
91
91
  thor (0.19.1)
92
- unicode-display_width (0.3.1)
92
+ unicode-display_width (1.0.2)
93
93
 
94
94
  PLATFORMS
95
95
  ruby
data/Guardfile CHANGED
@@ -25,6 +25,7 @@
25
25
  # * 'just' rspec: 'rspec'
26
26
 
27
27
  guard :rspec, cmd: "CODECLIMATE_REPO_TOKEN=f80e30cc893d8c6a41550e747e1d838c6123e9cc53f088bf4bc1337d40b3e581 bundle exec rspec" do
28
+ # guard :rspec, cmd: "bundle exec rspec" do
28
29
  require "guard/rspec/dsl"
29
30
  dsl = Guard::RSpec::Dsl.new(self)
30
31
 
data/cloud_sesame.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'CloudSesame'
3
- s.version = '0.6.8'
4
- s.date = '2016-02-16'
3
+ s.version = '0.7.0'
4
+ s.date = '2016-03-13'
5
5
  s.summary = "AWS CloudSearch Query DSL"
6
6
  s.description = "AWS CloudSearch Query DSL"
7
7
  s.authors = [
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "result": {
3
- "covered_percent": 85.91
3
+ "covered_percent": 92.78
4
4
  }
5
5
  }