tricorder 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +51 -0
  3. data/LICENSE +21 -0
  4. data/README.md +61 -0
  5. data/bin/tricorder +50 -0
  6. data/lib/dsl/operators/.rb +0 -0
  7. data/lib/dsl/operators/base_operators.rb +260 -0
  8. data/lib/dsl/operators/string.rb +9 -0
  9. data/lib/dsl/operators/tricorders.rb +68 -0
  10. data/lib/dsl/operators/tricorders/animal.rb +19 -0
  11. data/lib/dsl/operators/tricorders/astronomical_object.rb +19 -0
  12. data/lib/dsl/operators/tricorders/book.rb +19 -0
  13. data/lib/dsl/operators/tricorders/book_collection.rb +19 -0
  14. data/lib/dsl/operators/tricorders/book_series.rb +19 -0
  15. data/lib/dsl/operators/tricorders/character.rb +19 -0
  16. data/lib/dsl/operators/tricorders/comic_collection.rb +19 -0
  17. data/lib/dsl/operators/tricorders/comic_series.rb +19 -0
  18. data/lib/dsl/operators/tricorders/comic_strip.rb +19 -0
  19. data/lib/dsl/operators/tricorders/comics.rb +19 -0
  20. data/lib/dsl/operators/tricorders/company.rb +19 -0
  21. data/lib/dsl/operators/tricorders/conflict.rb +19 -0
  22. data/lib/dsl/operators/tricorders/element.rb +19 -0
  23. data/lib/dsl/operators/tricorders/episode.rb +19 -0
  24. data/lib/dsl/operators/tricorders/food.rb +19 -0
  25. data/lib/dsl/operators/tricorders/literature.rb +19 -0
  26. data/lib/dsl/operators/tricorders/location.rb +19 -0
  27. data/lib/dsl/operators/tricorders/magazine.rb +19 -0
  28. data/lib/dsl/operators/tricorders/magazine_series.rb +19 -0
  29. data/lib/dsl/operators/tricorders/material.rb +19 -0
  30. data/lib/dsl/operators/tricorders/medical_condition.rb +19 -0
  31. data/lib/dsl/operators/tricorders/movie.rb +19 -0
  32. data/lib/dsl/operators/tricorders/occupation.rb +19 -0
  33. data/lib/dsl/operators/tricorders/organization.rb +19 -0
  34. data/lib/dsl/operators/tricorders/performer.rb +19 -0
  35. data/lib/dsl/operators/tricorders/season.rb +19 -0
  36. data/lib/dsl/operators/tricorders/series.rb +19 -0
  37. data/lib/dsl/operators/tricorders/soundtrack.rb +19 -0
  38. data/lib/dsl/operators/tricorders/spacecraft.rb +19 -0
  39. data/lib/dsl/operators/tricorders/spacecraft_class.rb +19 -0
  40. data/lib/dsl/operators/tricorders/species.rb +19 -0
  41. data/lib/dsl/operators/tricorders/staff.rb +19 -0
  42. data/lib/dsl/operators/tricorders/technology.rb +19 -0
  43. data/lib/dsl/operators/tricorders/title.rb +19 -0
  44. data/lib/dsl/operators/tricorders/trading_card.rb +19 -0
  45. data/lib/dsl/operators/tricorders/trading_card_deck.rb +19 -0
  46. data/lib/dsl/operators/tricorders/trading_card_set.rb +19 -0
  47. data/lib/dsl/operators/tricorders/video_game.rb +19 -0
  48. data/lib/dsl/operators/tricorders/video_release.rb +19 -0
  49. data/lib/dsl/operators/tricorders/weapon.rb +19 -0
  50. data/lib/dsl/tricorder.rb +10 -0
  51. data/lib/dsl/tricorder_dsl.rb +23 -0
  52. data/lib/tricorder.rb +18 -0
  53. data/lib/version.rb +9 -0
  54. data/tricorder.gemspec +35 -0
  55. metadata +169 -0
@@ -0,0 +1,19 @@
1
+ require_relative '../../tricorder'
2
+ require_relative '../../tricorder_dsl'
3
+
4
+ module MagazineSeries
5
+ RESOURCE_NAME = 'magazineSeries'.freeze
6
+ COLLECTION_NAME = 'magazineSeries'.freeze
7
+ NAME = RESOURCE_NAME.underscore
8
+ API_PATH = Tricorder::BASE_URL + "/#{RESOURCE_NAME}"
9
+
10
+ private_constant :API_PATH, :RESOURCE_NAME, :COLLECTION_NAME, :NAME
11
+
12
+ define_method("search_#{NAME}".to_sym) do
13
+ set_tricorder(NAME.to_sym)
14
+ set_collection(COLLECTION_NAME)
15
+ set_path(API_PATH)
16
+ search
17
+ self
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require_relative '../../tricorder'
2
+ require_relative '../../tricorder_dsl'
3
+
4
+ module Material
5
+ RESOURCE_NAME = 'material'.freeze
6
+ COLLECTION_NAME = 'materials'.freeze
7
+ NAME = RESOURCE_NAME.underscore
8
+ API_PATH = Tricorder::BASE_URL + "/#{RESOURCE_NAME}"
9
+
10
+ private_constant :API_PATH, :RESOURCE_NAME, :COLLECTION_NAME, :NAME
11
+
12
+ define_method("search_#{NAME}".to_sym) do
13
+ set_tricorder(NAME.to_sym)
14
+ set_collection(COLLECTION_NAME)
15
+ set_path(API_PATH)
16
+ search
17
+ self
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require_relative '../../tricorder'
2
+ require_relative '../../tricorder_dsl'
3
+
4
+ module MedicalCondition
5
+ RESOURCE_NAME = 'medicalCondition'.freeze
6
+ COLLECTION_NAME = 'medicalConditions'.freeze
7
+ NAME = RESOURCE_NAME.underscore
8
+ API_PATH = Tricorder::BASE_URL + "/#{RESOURCE_NAME}"
9
+
10
+ private_constant :API_PATH, :RESOURCE_NAME, :COLLECTION_NAME, :NAME
11
+
12
+ define_method("search_#{NAME}".to_sym) do
13
+ set_tricorder(NAME.to_sym)
14
+ set_collection(COLLECTION_NAME)
15
+ set_path(API_PATH)
16
+ search
17
+ self
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require_relative '../../tricorder'
2
+ require_relative '../../tricorder_dsl'
3
+
4
+ module Movie
5
+ RESOURCE_NAME = 'movie'.freeze
6
+ COLLECTION_NAME = 'movies'.freeze
7
+ NAME = RESOURCE_NAME.underscore
8
+ API_PATH = Tricorder::BASE_URL + "/#{RESOURCE_NAME}"
9
+
10
+ private_constant :API_PATH, :RESOURCE_NAME, :COLLECTION_NAME, :NAME
11
+
12
+ define_method("search_#{NAME}".to_sym) do
13
+ set_tricorder(NAME.to_sym)
14
+ set_collection(COLLECTION_NAME)
15
+ set_path(API_PATH)
16
+ search
17
+ self
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require_relative '../../tricorder'
2
+ require_relative '../../tricorder_dsl'
3
+
4
+ module Occupation
5
+ RESOURCE_NAME = 'occupation'.freeze
6
+ COLLECTION_NAME = 'occupations'.freeze
7
+ NAME = RESOURCE_NAME.underscore
8
+ API_PATH = Tricorder::BASE_URL + "/#{RESOURCE_NAME}"
9
+
10
+ private_constant :API_PATH, :RESOURCE_NAME, :COLLECTION_NAME, :NAME
11
+
12
+ define_method("search_#{NAME}".to_sym) do
13
+ set_tricorder(NAME.to_sym)
14
+ set_collection(COLLECTION_NAME)
15
+ set_path(API_PATH)
16
+ search
17
+ self
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require_relative '../../tricorder'
2
+ require_relative '../../tricorder_dsl'
3
+
4
+ module Organization
5
+ RESOURCE_NAME = 'organization'.freeze
6
+ COLLECTION_NAME = 'organizations'.freeze
7
+ NAME = RESOURCE_NAME.underscore
8
+ API_PATH = Tricorder::BASE_URL + "/#{RESOURCE_NAME}"
9
+
10
+ private_constant :API_PATH, :RESOURCE_NAME, :COLLECTION_NAME, :NAME
11
+
12
+ define_method("search_#{NAME}".to_sym) do
13
+ set_tricorder(NAME.to_sym)
14
+ set_collection(COLLECTION_NAME)
15
+ set_path(API_PATH)
16
+ search
17
+ self
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require_relative '../../tricorder'
2
+ require_relative '../../tricorder_dsl'
3
+
4
+ module Performer
5
+ RESOURCE_NAME = 'literature'.freeze
6
+ COLLECTION_NAME = 'literature'.freeze
7
+ NAME = RESOURCE_NAME.underscore
8
+ API_PATH = Tricorder::BASE_URL + "/#{RESOURCE_NAME}"
9
+
10
+ private_constant :API_PATH, :RESOURCE_NAME, :COLLECTION_NAME, :NAME
11
+
12
+ define_method("search_#{NAME}".to_sym) do
13
+ set_tricorder(NAME.to_sym)
14
+ set_collection(COLLECTION_NAME)
15
+ set_path(API_PATH)
16
+ search
17
+ self
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require_relative '../../tricorder'
2
+ require_relative '../../tricorder_dsl'
3
+
4
+ module Season
5
+ RESOURCE_NAME = 'season'.freeze
6
+ COLLECTION_NAME = 'seasons'.freeze
7
+ NAME = RESOURCE_NAME.underscore
8
+ API_PATH = Tricorder::BASE_URL + "/#{RESOURCE_NAME}"
9
+
10
+ private_constant :API_PATH, :RESOURCE_NAME, :COLLECTION_NAME, :NAME
11
+
12
+ define_method("search_#{NAME}".to_sym) do
13
+ set_tricorder(NAME.to_sym)
14
+ set_collection(COLLECTION_NAME)
15
+ set_path(API_PATH)
16
+ search
17
+ self
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require_relative '../../tricorder'
2
+ require_relative '../../tricorder_dsl'
3
+
4
+ module Series
5
+ RESOURCE_NAME = 'series'.freeze
6
+ COLLECTION_NAME = 'series'.freeze
7
+ NAME = RESOURCE_NAME.underscore
8
+ API_PATH = Tricorder::BASE_URL + "/#{RESOURCE_NAME}"
9
+
10
+ private_constant :API_PATH, :RESOURCE_NAME, :COLLECTION_NAME, :NAME
11
+
12
+ define_method("search_#{NAME}".to_sym) do
13
+ set_tricorder(NAME.to_sym)
14
+ set_collection(COLLECTION_NAME)
15
+ set_path(API_PATH)
16
+ search
17
+ self
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require_relative '../../tricorder'
2
+ require_relative '../../tricorder_dsl'
3
+
4
+ module Soundtrack
5
+ RESOURCE_NAME = 'soundtrack'.freeze
6
+ COLLECTION_NAME = 'soundtracks'.freeze
7
+ NAME = RESOURCE_NAME.underscore
8
+ API_PATH = Tricorder::BASE_URL + "/#{RESOURCE_NAME}"
9
+
10
+ private_constant :API_PATH, :RESOURCE_NAME, :COLLECTION_NAME, :NAME
11
+
12
+ define_method("search_#{NAME}".to_sym) do
13
+ set_tricorder(NAME.to_sym)
14
+ set_collection(COLLECTION_NAME)
15
+ set_path(API_PATH)
16
+ search
17
+ self
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require_relative '../../tricorder'
2
+ require_relative '../../tricorder_dsl'
3
+
4
+ module Spacecraft
5
+ RESOURCE_NAME = 'spacecraft'.freeze
6
+ COLLECTION_NAME = 'spacecrafts'.freeze
7
+ NAME = RESOURCE_NAME.underscore
8
+ API_PATH = Tricorder::BASE_URL + "/#{RESOURCE_NAME}"
9
+
10
+ private_constant :API_PATH, :RESOURCE_NAME, :COLLECTION_NAME, :NAME
11
+
12
+ define_method("search_#{NAME}".to_sym) do
13
+ set_tricorder(NAME.to_sym)
14
+ set_collection(COLLECTION_NAME)
15
+ set_path(API_PATH)
16
+ search
17
+ self
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require_relative '../../tricorder'
2
+ require_relative '../../tricorder_dsl'
3
+
4
+ module SpacecraftClass
5
+ RESOURCE_NAME = 'spacecraftClass'.freeze
6
+ COLLECTION_NAME = 'spacecraftClasses'.freeze
7
+ NAME = RESOURCE_NAME.underscore
8
+ API_PATH = Tricorder::BASE_URL + "/#{RESOURCE_NAME}"
9
+
10
+ private_constant :API_PATH, :RESOURCE_NAME, :COLLECTION_NAME, :NAME
11
+
12
+ define_method("search_#{NAME}".to_sym) do
13
+ set_tricorder(NAME.to_sym)
14
+ set_collection(COLLECTION_NAME)
15
+ set_path(API_PATH)
16
+ search
17
+ self
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require_relative '../../tricorder'
2
+ require_relative '../../tricorder_dsl'
3
+
4
+ module Species
5
+ RESOURCE_NAME = 'species'.freeze
6
+ COLLECTION_NAME = 'species'.freeze
7
+ NAME = RESOURCE_NAME.underscore
8
+ API_PATH = Tricorder::BASE_URL + "/#{RESOURCE_NAME}"
9
+
10
+ private_constant :API_PATH, :RESOURCE_NAME, :COLLECTION_NAME, :NAME
11
+
12
+ define_method("search_#{NAME}".to_sym) do
13
+ set_tricorder(NAME.to_sym)
14
+ set_collection(COLLECTION_NAME)
15
+ set_path(API_PATH)
16
+ search
17
+ self
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require_relative '../../tricorder'
2
+ require_relative '../../tricorder_dsl'
3
+
4
+ module Staff
5
+ RESOURCE_NAME = 'staff'.freeze
6
+ COLLECTION_NAME = 'staff'.freeze
7
+ NAME = RESOURCE_NAME.underscore
8
+ API_PATH = Tricorder::BASE_URL + "/#{RESOURCE_NAME}"
9
+
10
+ private_constant :API_PATH, :RESOURCE_NAME, :COLLECTION_NAME, :NAME
11
+
12
+ define_method("search_#{NAME}".to_sym) do
13
+ set_tricorder(NAME.to_sym)
14
+ set_collection(COLLECTION_NAME)
15
+ set_path(API_PATH)
16
+ search
17
+ self
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require_relative '../../tricorder'
2
+ require_relative '../../tricorder_dsl'
3
+
4
+ module Technology
5
+ RESOURCE_NAME = 'technology'.freeze
6
+ COLLECTION_NAME = 'technology'.freeze
7
+ NAME = RESOURCE_NAME.underscore
8
+ API_PATH = Tricorder::BASE_URL + "/#{RESOURCE_NAME}"
9
+
10
+ private_constant :API_PATH, :RESOURCE_NAME, :COLLECTION_NAME, :NAME
11
+
12
+ define_method("search_#{NAME}".to_sym) do
13
+ set_tricorder(NAME.to_sym)
14
+ set_collection(COLLECTION_NAME)
15
+ set_path(API_PATH)
16
+ search
17
+ self
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require_relative '../../tricorder'
2
+ require_relative '../../tricorder_dsl'
3
+
4
+ module Title
5
+ RESOURCE_NAME = 'title'.freeze
6
+ COLLECTION_NAME = 'titles'.freeze
7
+ NAME = RESOURCE_NAME.underscore
8
+ API_PATH = Tricorder::BASE_URL + "/#{RESOURCE_NAME}"
9
+
10
+ private_constant :API_PATH, :RESOURCE_NAME, :COLLECTION_NAME, :NAME
11
+
12
+ define_method("search_#{NAME}".to_sym) do
13
+ set_tricorder(NAME.to_sym)
14
+ set_collection(COLLECTION_NAME)
15
+ set_path(API_PATH)
16
+ search
17
+ self
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require_relative '../../tricorder'
2
+ require_relative '../../tricorder_dsl'
3
+
4
+ module TradingCard
5
+ RESOURCE_NAME = 'tradingCard'.freeze
6
+ COLLECTION_NAME = 'tradingCard'.freeze
7
+ NAME = RESOURCE_NAME.underscore
8
+ API_PATH = Tricorder::BASE_URL + "/#{RESOURCE_NAME}"
9
+
10
+ private_constant :API_PATH, :RESOURCE_NAME, :COLLECTION_NAME, :NAME
11
+
12
+ define_method("search_#{NAME}".to_sym) do
13
+ set_tricorder(NAME.to_sym)
14
+ set_collection(COLLECTION_NAME)
15
+ set_path(API_PATH)
16
+ search
17
+ self
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require_relative '../../tricorder'
2
+ require_relative '../../tricorder_dsl'
3
+
4
+ module TradingCardDeck
5
+ RESOURCE_NAME = 'tradingCardDeck'.freeze
6
+ COLLECTION_NAME = 'tradingCardDecks'.freeze
7
+ NAME = RESOURCE_NAME.underscore
8
+ API_PATH = Tricorder::BASE_URL + "/#{RESOURCE_NAME}"
9
+
10
+ private_constant :API_PATH, :RESOURCE_NAME, :COLLECTION_NAME, :NAME
11
+
12
+ define_method("search_#{NAME}".to_sym) do
13
+ set_tricorder(NAME.to_sym)
14
+ set_collection(COLLECTION_NAME)
15
+ set_path(API_PATH)
16
+ search
17
+ self
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require_relative '../../tricorder'
2
+ require_relative '../../tricorder_dsl'
3
+
4
+ module TradingCardSet
5
+ RESOURCE_NAME = 'tradingCardSet'.freeze
6
+ COLLECTION_NAME = 'tradingCardSets'.freeze
7
+ NAME = RESOURCE_NAME.underscore
8
+ API_PATH = Tricorder::BASE_URL + "/#{RESOURCE_NAME}"
9
+
10
+ private_constant :API_PATH, :RESOURCE_NAME, :COLLECTION_NAME, :NAME
11
+
12
+ define_method("search_#{NAME}".to_sym) do
13
+ set_tricorder(NAME.to_sym)
14
+ set_collection(COLLECTION_NAME)
15
+ set_path(API_PATH)
16
+ search
17
+ self
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require_relative '../../tricorder'
2
+ require_relative '../../tricorder_dsl'
3
+
4
+ module VideoGame
5
+ RESOURCE_NAME = 'videoGame'.freeze
6
+ COLLECTION_NAME = 'videoGames'.freeze
7
+ NAME = RESOURCE_NAME.underscore
8
+ API_PATH = Tricorder::BASE_URL + "/#{RESOURCE_NAME}"
9
+
10
+ private_constant :API_PATH, :RESOURCE_NAME, :COLLECTION_NAME, :NAME
11
+
12
+ define_method("search_#{NAME}".to_sym) do
13
+ set_tricorder(NAME.to_sym)
14
+ set_collection(COLLECTION_NAME)
15
+ set_path(API_PATH)
16
+ search
17
+ self
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require_relative '../../tricorder'
2
+ require_relative '../../tricorder_dsl'
3
+
4
+ module VideoRelease
5
+ RESOURCE_NAME = 'videoRelease'.freeze
6
+ COLLECTION_NAME = 'videoReleases'.freeze
7
+ NAME = RESOURCE_NAME.underscore
8
+ API_PATH = Tricorder::BASE_URL + "/#{RESOURCE_NAME}"
9
+
10
+ private_constant :API_PATH, :RESOURCE_NAME, :COLLECTION_NAME, :NAME
11
+
12
+ define_method("search_#{NAME}".to_sym) do
13
+ set_tricorder(NAME.to_sym)
14
+ set_collection(COLLECTION_NAME)
15
+ set_path(API_PATH)
16
+ search
17
+ self
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require_relative '../../tricorder'
2
+ require_relative '../../tricorder_dsl'
3
+
4
+ module Weapon
5
+ RESOURCE_NAME = 'weapon'.freeze
6
+ COLLECTION_NAME = 'weapons'.freeze
7
+ NAME = RESOURCE_NAME.underscore
8
+ API_PATH = Tricorder::BASE_URL + "/#{RESOURCE_NAME}"
9
+
10
+ private_constant :API_PATH, :RESOURCE_NAME, :COLLECTION_NAME, :NAME
11
+
12
+ define_method("search_#{NAME}".to_sym) do
13
+ set_tricorder(NAME.to_sym)
14
+ set_collection(COLLECTION_NAME)
15
+ set_path(API_PATH)
16
+ search
17
+ self
18
+ end
19
+ end