mumuki-bibliotheca 6.4.0 → 6.4.1

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
  SHA256:
3
- metadata.gz: f154a0f7493c9b04b0f3c0e02491271e05760eb36deb8310575a2d8e97fae3b0
4
- data.tar.gz: 17cbab22333dcacec4aab3d650a91925f5dbd7024b3ddb7321b7628c6be01740
3
+ metadata.gz: 1cd83a3fcbc452a652eb52308e58c80cff92b80d617fb8245eeba0846127ed90
4
+ data.tar.gz: 3079fe15d2186e9ead02feec86a6d27648ad141aac0e1238f2532a90fbe21b44
5
5
  SHA512:
6
- metadata.gz: e59dc509afcd88bb86d461fdf4265479d50d45a54e4c6114882a1fddbc98bfd79d0c0d1e81008db3617b1dd623f799981b91d230d494d5ef028698348a9eb5aa
7
- data.tar.gz: a56954abcc745f68b5e1b5bc6d6c118c4e4a2ea110a19723d7253f8e3060fb31e1e077ae5483a20ba230f700685201f20653bf7203cc8fe88400d2e488be4364
6
+ metadata.gz: e9871740c88c16a67dd461b62e5d25fc0025342b2530f8572e960676ea233b97bc3d18f94c4f9ddf6a6ae240cf007b159141ce020f6c1d763b0da98ce37017eb
7
+ data.tar.gz: 1b5181057011b9cf8d3d82e40ac2e9ea539612634f1442c185013b317db6cdc9c936790c02c6f3f0c87ea3a5e4bec8136c0528f048b5b73b7c377bcada4beb9c
@@ -1,5 +1,5 @@
1
1
  module Mumuki
2
2
  module Bibliotheca
3
- VERSION = '6.4.0'
3
+ VERSION = '6.4.1'
4
4
  end
5
5
  end
@@ -1,10 +1,12 @@
1
- namespace :content do
2
- task :import do
3
- bridge = Mumukit::Platform.bibliotheca_bridge
4
- bridge.import_contents! do |resource_type, slug|
5
- resource = bridge.send(resource_type, slug)
1
+ namespace :bibliotheca do
2
+ namespace :content do
3
+ task :import do
4
+ bridge = Mumukit::Platform.bibliotheca_bridge
5
+ bridge.import_contents! do |resource_type, slug|
6
+ resource = bridge.send(resource_type, slug)
6
7
 
7
- Bibliotheca::Collection.insert_hash! resource_type, resource
8
+ Bibliotheca::Collection.insert_hash! resource_type, resource
9
+ end
8
10
  end
9
11
  end
10
12
  end
@@ -1,11 +1,13 @@
1
1
  logger = Mumukit::Nuntius::Logger
2
- namespace :events do
3
- task listen: :environment do
4
- logger.info 'Loading event handlers....'
5
- require_relative '../events'
6
- logger.info "Loaded handlers #{Mumukit::Nuntius::EventConsumer.handled_events}!"
2
+ namespace :bibliotheca do
3
+ namespace :events do
4
+ task listen: :environment do
5
+ logger.info 'Loading event handlers....'
6
+ require_relative '../mumuki/bibliotheca/events/events'
7
+ logger.info "Loaded handlers #{Mumukit::Nuntius::EventConsumer.handled_events}!"
7
8
 
8
- logger.info 'Listening to events...'
9
- Mumukit::Nuntius::EventConsumer.start!
9
+ logger.info 'Listening to events...'
10
+ Mumukit::Nuntius::EventConsumer.start!
11
+ end
10
12
  end
11
13
  end
@@ -1,36 +1,33 @@
1
- namespace :guides do
2
- def guides_for_organization(org)
3
- Octokit.auto_paginate = true
4
- Octokit.repos(org).map(&:full_name).select { |it| it =~ /guia/ }
5
- end
1
+ namespace :bibliotheca do
2
+ namespace :guides do
3
+ def guides_for_organization(org)
4
+ Octokit.auto_paginate = true
5
+ Octokit.repos(org).map(&:full_name).select { |it| it =~ /guia/ }
6
+ end
6
7
 
7
- task :export, [:author_email] do |_t, args|
8
- author_email = args[:author_email]
9
- Bibliotheca::Collection::Guides.all.each do |it|
10
- it.export! author_email rescue (puts "ignoring #{it.slug}")
8
+ task :export, [:author_email] do |_t, args|
9
+ author_email = args[:author_email]
10
+ Bibliotheca::Collection::Guides.all.each do |it|
11
+ it.export! author_email rescue (puts "ignoring #{it.slug}")
12
+ end
11
13
  end
12
- end
13
14
 
14
- task :import_from_github, [:organization, :url] do |_t, args|
15
- args.with_defaults(url: 'http://localhost:3004')
15
+ task :import_from_github, [:organization, :url] do |_t, args|
16
+ args.with_defaults(url: 'http://localhost:3004')
16
17
 
17
- org = args[:organization]
18
- url = args[:url]
18
+ org = args[:organization]
19
+ url = args[:url]
19
20
 
20
- puts "importing guides from organization #{org} into #{url}"
21
+ puts "importing guides from organization #{org} into #{url}"
21
22
 
22
- guides_for_organization(org).each do |slug|
23
- puts "importing guide #{slug}...."
24
- begin
25
- RestClient.post "#{url}/guides/import/#{slug}", {}
26
- rescue => e
27
- puts "import failed! #{e.response}"
23
+ guides_for_organization(org).each do |slug|
24
+ puts "importing guide #{slug}...."
25
+ begin
26
+ RestClient.post "#{url}/guides/import/#{slug}", {}
27
+ rescue => e
28
+ puts "import failed! #{e.response}"
29
+ end
28
30
  end
29
31
  end
30
32
  end
31
33
  end
32
-
33
-
34
-
35
-
36
-
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mumuki-bibliotheca
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.4.0
4
+ version: 6.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franco Bulgarelli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-24 00:00:00.000000000 Z
11
+ date: 2019-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -160,9 +160,9 @@ files:
160
160
  - README.md
161
161
  - Rakefile
162
162
  - config/routes.rb
163
- - lib/events.rb
164
163
  - lib/mumuki/bibliotheca.rb
165
164
  - lib/mumuki/bibliotheca/engine.rb
165
+ - lib/mumuki/bibliotheca/events/events.rb
166
166
  - lib/mumuki/bibliotheca/sinatra.rb
167
167
  - lib/mumuki/bibliotheca/sinatra/books.rb
168
168
  - lib/mumuki/bibliotheca/sinatra/guides.rb
@@ -193,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
195
  requirements: []
196
- rubygems_version: 3.0.2
196
+ rubygems_version: 3.0.3
197
197
  signing_key:
198
198
  specification_version: 4
199
199
  summary: API for editing content on mumuki