date_book 0.1.3 → 0.1.4

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: 9313fdcea72f8dc8ea2f308bd9d36237f87abe11
4
- data.tar.gz: 500cc637ab048305ec1156361df3483821a762cb
3
+ metadata.gz: 0e942214f7740c2039a45b0e26cb8a88ee889837
4
+ data.tar.gz: ab55e0bf1064fca074df573172ee738819755c84
5
5
  SHA512:
6
- metadata.gz: 50a404dcc241886b9e591e627d3789face6af83df77445bc16fb77b7502ed794287d202120b1dad4b55b923775d6b79a9006958ad152790f15965f9a90e6b4f8
7
- data.tar.gz: d9c757089ca4c97c82af0156c01d70ad00a0a67d7af3c3e53a45179cd21411bf6f416f104ac94c11731d028cc57c83816015d633ceb7cb7d34ea94570307e625
6
+ metadata.gz: 91bfb2852dfff95ac6dd280c2b09919738f61bcaeb3507a9a73a61cd8611c8e5018bd58d4d4d007bd43fd827383c505fbf70bfcf055a2dd66796e6544b08ee1a
7
+ data.tar.gz: c1429504367759e031b7891d994abcee893fb536a623e0ae9419f3fc7fdc2559ff1eff0291eac9c9cd62d2da17ce5008ce304f68ce2e1093fd0fa605b08129ee
data/README.md CHANGED
@@ -1,8 +1,7 @@
1
1
  # DateBook
2
2
  [![GitHub version](https://badge.fury.io/gh/gemvein%2Fdate_book.svg)](http://badge.fury.io/gh/gemvein%2Fdate_book)
3
3
  [![Build Status](https://travis-ci.org/gemvein/date_book.svg)](https://travis-ci.org/gemvein/date_book)
4
- [![Coverage Status](https://coveralls.io/repos/gemvein/date_book/badge.png)](https://coveralls.io/r/gemvein/date_book)
5
-
4
+ [![Coverage Status](https://coveralls.io/repos/gemvein/date_book/badge.svg)](https://coveralls.io/r/gemvein/date_book)
6
5
  Date Book, still in alpha develpment, is a Rails 5 Engine to give Users the ability to publish and manage calendars of events.
7
6
 
8
7
  ## Installation
data/Rakefile CHANGED
@@ -24,4 +24,5 @@ RSpec::Core::RakeTask.new(:spec) do |spec|
24
24
  spec.pattern = FileList['spec/**/*_spec.rb']
25
25
  end
26
26
 
27
+ load 'lib/tasks/date_book.rake'
27
28
  task default: :spec
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
@@ -3,6 +3,8 @@
3
3
  DateBookSchema = GraphQL::Schema.define do
4
4
  # mutation(Types::MutationType)
5
5
  query(Types::QueryType)
6
+
7
+ # TODO: What is this code for?
6
8
  resolve_type(lambda do |_type, obj, _ctx|
7
9
  case obj
8
10
  when Calendar
@@ -15,4 +17,5 @@ DateBookSchema = GraphQL::Schema.define do
15
17
  raise("Unexpected object: #{obj}")
16
18
  end
17
19
  end)
20
+
18
21
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  Types::EventOccurrenceType = GraphQL::ObjectType.define do
4
- name 'Event Occurrences'
4
+ name 'EventOccurrences'
5
5
  description 'DateBook Event Occurrences'
6
6
 
7
7
  field :id, !types.ID
@@ -3,7 +3,7 @@
3
3
  # This defines the top-level queries that are available.
4
4
  # rubocop:disable Metrics/BlockLength
5
5
  Types::QueryType = GraphQL::ObjectType.define do
6
- name 'Date Book API'
6
+ name 'Query'
7
7
  # Add root-level fields here.
8
8
  # They will be entry points for queries on your schema.
9
9
  field :event_occurrences do
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: date_book 0.1.3 ruby lib
5
+ # stub: date_book 0.1.4 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "date_book".freeze
9
- s.version = "0.1.3"
9
+ s.version = "0.1.4"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Karen Lundgren".freeze]
14
- s.date = "2017-08-13"
14
+ s.date = "2017-08-29"
15
15
  s.email = "karen.e.lundgren@gmail.com".freeze
16
16
  s.extra_rdoc_files = [
17
17
  "LICENSE.txt",
@@ -108,7 +108,7 @@ Gem::Specification.new do |s|
108
108
  "lib/generators/date_book/install/templates/app/models/schedule.rb",
109
109
  "lib/generators/date_book/install/templates/config/initializers/date_book.rb",
110
110
  "lib/generators/date_book/utils.rb",
111
- "lib/tasks/date_book_tasks.rake",
111
+ "lib/tasks/date_book.rake",
112
112
  "spec/abilities/calendar_spec.rb",
113
113
  "spec/abilities/event_spec.rb",
114
114
  "spec/controllers/date_book/calendars_controller_spec.rb",
@@ -189,6 +189,8 @@ Gem::Specification.new do |s|
189
189
  "spec/dummy/lib/assets/.keep",
190
190
  "spec/dummy/lib/basic_benchmark.rb",
191
191
  "spec/dummy/log/.keep",
192
+ "spec/dummy/public/date_book_schema.graphql",
193
+ "spec/dummy/public/schema.graphql",
192
194
  "spec/factories/calendars.rb",
193
195
  "spec/factories/events.rb",
194
196
  "spec/factories/roles.rb",
@@ -32,7 +32,7 @@ module DateBook
32
32
  initializer 'date_book.add_middleware' do |app|
33
33
  app.config.middleware.insert_before 0, Rack::Cors do
34
34
  allow do
35
- origins %r{\Ahttp://localhost:3000\z}
35
+ origins %r{\Ahttps?://localhost:?[0-9]+\z}
36
36
  resource '*', headers: :any, methods: %i[get post options]
37
37
  end
38
38
  end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+ namespace :date_book do
3
+ desc 'Dump GraphQL Schema'
4
+ task dump_schema: :environment do
5
+ # Get a string containing the definition in GraphQL IDL:
6
+ schema_defn = DateBookSchema.to_definition
7
+ # Choose a place to write the schema dump:
8
+ schema_path = "public/date_book_schema.graphql"
9
+ # Write the schema dump to that file:
10
+ File.open(Rails.root.join(schema_path), 'w') { |f| f << schema_defn }
11
+ puts "Updated #{schema_path}"
12
+ end
13
+ end
@@ -1,4 +1,8 @@
1
1
  // 'bootstrap-sprockets' must be imported before 'bootstrap' and 'bootstrap/variables'
2
2
  @import 'bootstrap-sprockets';
3
3
  @import 'bootstrap-everything';
4
- @import 'bootstrap/theme';
4
+ @import 'bootstrap/theme';
5
+
6
+ body {
7
+ font-size: 16px
8
+ }
Binary file
@@ -0,0 +1,53 @@
1
+ # DateBook Calendars
2
+ type Calendar {
3
+ created_at: DateTime
4
+ css_class: String
5
+ description: String
6
+ event_occurrences: [EventOccurrences]
7
+ events: [Event]
8
+ id: ID
9
+ name: String
10
+ slug: String!
11
+ updated_at: DateTime
12
+ }
13
+
14
+ # Date with Time
15
+ scalar DateTime
16
+
17
+ # DateBook Events
18
+ type Event {
19
+ all_day: Boolean
20
+ background_color: String
21
+ border_color: String
22
+ calendar: Calendar
23
+ created_at: DateTime
24
+ css_class: String
25
+ description: String
26
+ duration: String
27
+ end: String
28
+ id: ID!
29
+ name: String
30
+ slug: String
31
+ start: String
32
+ text_color: String
33
+ updated_at: DateTime
34
+ url: String
35
+ }
36
+
37
+ # DateBook Event Occurrences
38
+ type EventOccurrences {
39
+ end: String
40
+ event: Event
41
+ id: ID!
42
+ popover_url: String
43
+ start: String
44
+ url: String
45
+ }
46
+
47
+ type Query {
48
+ # Find a calendar by slug
49
+ calendar(slug: String): Calendar
50
+
51
+ # Find all event occurrences in range
52
+ event_occurrences(ending_after: String, starting_before: String): [EventOccurrences]
53
+ }
File without changes
@@ -19,7 +19,7 @@ RSpec.feature 'Events', folder: :features do
19
19
  it_behaves_like(
20
20
  'a bootstrap page listing a collection of items',
21
21
  Event,
22
- minimum: 5
22
+ minimum: 4
23
23
  )
24
24
  end
25
25
  describe 'with a query' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: date_book
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karen Lundgren
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-13 00:00:00.000000000 Z
11
+ date: 2017-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -718,7 +718,7 @@ files:
718
718
  - lib/generators/date_book/install/templates/app/models/schedule.rb
719
719
  - lib/generators/date_book/install/templates/config/initializers/date_book.rb
720
720
  - lib/generators/date_book/utils.rb
721
- - lib/tasks/date_book_tasks.rake
721
+ - lib/tasks/date_book.rake
722
722
  - spec/abilities/calendar_spec.rb
723
723
  - spec/abilities/event_spec.rb
724
724
  - spec/controllers/date_book/calendars_controller_spec.rb
@@ -799,6 +799,8 @@ files:
799
799
  - spec/dummy/lib/assets/.keep
800
800
  - spec/dummy/lib/basic_benchmark.rb
801
801
  - spec/dummy/log/.keep
802
+ - spec/dummy/public/date_book_schema.graphql
803
+ - spec/dummy/public/schema.graphql
802
804
  - spec/factories/calendars.rb
803
805
  - spec/factories/events.rb
804
806
  - spec/factories/roles.rb
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
- # desc "Explaining what the task does"
3
- # task :date_book do
4
- # # Task goes here
5
- # end