movieDB 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7522418d9aeaec5ff6eb52d3cfe694f617162546
4
- data.tar.gz: f3ae4a57ba1804cb38521ccb96edb6cd7739e36d
3
+ metadata.gz: 0e6fee2ee8054177e2d5a65420ce7badcdd35a4a
4
+ data.tar.gz: 0f74c601c36a82da5e99ca428a420b2452759a71
5
5
  SHA512:
6
- metadata.gz: 6dcca13a7c59c4b4c90b3fc9f13a217137d8186d994a1fb849e506ae14bd79a5f0acd880dd3120d9e59cb6dbe47335c0439e08256eea660e571e917d0b3f5daf
7
- data.tar.gz: 6867b912311c3d337a500df2b97caf3fe296bf458a3b3fd13043d90e26ee43b8fcfc6f4a0c5033e3e79be3e9ed7cee424c20cf6e2658db9442d27b8e94f606e3
6
+ metadata.gz: caa2a1210d8b243fd4bedee202e01e64b2d4487dff4a959b8869da73fbfaae3a9d25fcfc2919028ca0aed89eb46ec6596ab3ab0dd26fbfba941d14fe6dc5fa0e
7
+ data.tar.gz: 59122f893548d1e0e19e2aae88b538509e7237f66dc42ded9e5f83be09580fd5824b8ef025122ed875eababc2ffdc610e92befb9c2bdd8d6fac9360ab967216a
data/lib/movieDB.rb CHANGED
@@ -14,12 +14,18 @@ require "movieDB/version"
14
14
  # Example
15
15
  # movie = Movie.new()
16
16
  # movie.title = "When Sally Met Harry"
17
+
17
18
  unless defined? MovieDB::Movie
18
19
  module MovieDB
19
20
  class Movie < MovieDB::Base
20
21
 
21
22
  prepend StatusChecker
22
23
 
24
+ # Use example
25
+ # raise MovieError unless Movie.title_present?
26
+
27
+ const_set("MovieError", Class.new(StandardError))
28
+
23
29
  attr_accessor :title, :cast, :director, :released_date, :released_date, :film_release, :writer,
24
30
  :unique_id, :genre, :academy_award_nomination, :academy_award_wins, :golden_globe_nominations, :golden_globe_wins,
25
31
  :bafta_nomination, :bafta_wins, :worldwide_gross
@@ -106,7 +112,7 @@ unless defined? MovieDB::Movie
106
112
  def filter_movie_attr(attr)
107
113
  attr_raw = attr
108
114
  attr_sym = attr.to_sym
109
-
115
+
110
116
  raise ArgumentError, "#{attr_sym} is not a valid attribute." if !attr_sym == :director && :cast
111
117
  filtered = @movie_DS.select{|ds| ds.attr_title?}.map(&attr_sym).flatten
112
118
  attr_raw == 'title' ? filtered : filtered.uniq
@@ -125,6 +131,7 @@ unless defined? MovieDB::Movie
125
131
  # Example
126
132
  #
127
133
  # capture(synopsis: "Last Vegas - Four geriatric friends vow to set Las Vegas Ablaze.")
134
+
128
135
  def capture(**opts)
129
136
  @synopsis = opts
130
137
  end
@@ -0,0 +1,29 @@
1
+ Action
2
+ Adventure
3
+ Animation
4
+ Biography
5
+ Comedy
6
+ Crime
7
+ Documentary
8
+ Drama
9
+ Family
10
+ Fantasy
11
+ Film-Noir
12
+ Game-Show
13
+ History
14
+ Horror
15
+ Music
16
+ Musical
17
+ Mystery
18
+ News
19
+ Reality-TV
20
+ Romance
21
+ Sci-Fi
22
+ Scifi
23
+ Sport
24
+ Suspense
25
+ Talk-Show
26
+ Thriller
27
+ War
28
+ Western
29
+
@@ -1,3 +1,3 @@
1
1
  module MovieDB
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
data/movieDB.gemspec CHANGED
@@ -23,4 +23,5 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency "rspec"
24
24
  spec.add_development_dependency 'fakeweb'
25
25
  spec.add_dependency "activesupport", ">= 4.0.0"
26
+ spec.add_dependency "simple_bdd"
26
27
  end
data/spec/movieDB_spec.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'spec_helper'
2
+ require 'simple_bdd'
2
3
 
3
4
  describe MovieDB do
4
5
  let(:defaultMovie){ MovieDB::Movie.new() }
@@ -58,7 +59,7 @@ describe MovieDB do
58
59
 
59
60
  it "should accept new synopsis argument" do
60
61
  newCap.capture( synopsis: "Last Vegas - Four geriatric friends vow to set Las Vegas Ablaze.").should === {:synopsis=>"Last Vegas - Four geriatric friends vow to set Las Vegas Ablaze."}
61
-
62
62
  end
63
63
  end
64
+
64
65
  end
data/spec/spec_helper.rb CHANGED
@@ -6,3 +6,9 @@ require 'MovieDB/status_checker'
6
6
  require 'MovieDB/movie_error'
7
7
  require 'MovieDB/person'
8
8
  require 'movieDB'
9
+
10
+ require 'simple_bdd'
11
+
12
+ RSpec.configure do |config|
13
+ config.include SimpleBdd
14
+ end
metadata CHANGED
@@ -1,85 +1,99 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: movieDB
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Albert_McKeever
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-24 00:00:00.000000000 Z
11
+ date: 2013-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: fakeweb
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: activesupport
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: 4.0.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: 4.0.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: simple_bdd
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  description: Collect Movie Information. Perform Data Analysis
84
98
  email:
85
99
  - kotn_ep1@hotmail.com
@@ -87,13 +101,14 @@ executables: []
87
101
  extensions: []
88
102
  extra_rdoc_files: []
89
103
  files:
90
- - .gitignore
104
+ - ".gitignore"
91
105
  - Gemfile
92
106
  - LICENSE.txt
93
107
  - README.md
94
108
  - Rakefile
95
109
  - lib/movieDB.rb
96
110
  - lib/movieDB/base.rb
111
+ - lib/movieDB/genres/en.txt
97
112
  - lib/movieDB/movie_error.rb
98
113
  - lib/movieDB/person.rb
99
114
  - lib/movieDB/status_checker.rb
@@ -113,17 +128,17 @@ require_paths:
113
128
  - lib
114
129
  required_ruby_version: !ruby/object:Gem::Requirement
115
130
  requirements:
116
- - - '>='
131
+ - - ">="
117
132
  - !ruby/object:Gem::Version
118
133
  version: '0'
119
134
  required_rubygems_version: !ruby/object:Gem::Requirement
120
135
  requirements:
121
- - - '>='
136
+ - - ">="
122
137
  - !ruby/object:Gem::Version
123
138
  version: '0'
124
139
  requirements: []
125
140
  rubyforge_project:
126
- rubygems_version: 2.1.3
141
+ rubygems_version: 2.1.11
127
142
  signing_key:
128
143
  specification_version: 4
129
144
  summary: Movie Statistic and Data Analysis