date_book 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -2
- data/Rakefile +1 -0
- data/VERSION +1 -1
- data/app/graphql/date_book_schema.rb +3 -0
- data/app/graphql/types/event_occurrence_type.rb +1 -1
- data/app/graphql/types/query_type.rb +1 -1
- data/date_book.gemspec +6 -4
- data/lib/date_book/engine.rb +1 -1
- data/lib/tasks/date_book.rake +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css.scss +5 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/public/date_book_schema.graphql +53 -0
- data/spec/dummy/public/schema.graphql +0 -0
- data/spec/features/events_spec.rb +1 -1
- metadata +5 -3
- data/lib/tasks/date_book_tasks.rake +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e942214f7740c2039a45b0e26cb8a88ee889837
|
4
|
+
data.tar.gz: ab55e0bf1064fca074df573172ee738819755c84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
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
|
@@ -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 '
|
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
|
data/date_book.gemspec
CHANGED
@@ -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.
|
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.
|
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-
|
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/
|
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",
|
data/lib/date_book/engine.rb
CHANGED
@@ -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{\
|
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
|
data/spec/dummy/db/test.sqlite3
CHANGED
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
|
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.
|
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-
|
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/
|
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
|