redmine_mautic 0.1.1 → 0.2.0

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: 2dd12867669658f7fbef2bf96263cc2b0c7807f0aeab9c3ca35a568460ed5c26
4
- data.tar.gz: 35d02d9c9d0321312d04dd097506db2cbe04b45fa7aab1112d9073125c170bd1
3
+ metadata.gz: ec26ed9cc2e0aa2ff2f108a7aba4cd0e0ba15b5f3b29f27416338eb7a164e711
4
+ data.tar.gz: 32042be2e25603f84b94722baba573a044ed0e350ebbdbcec0007781c4f79566
5
5
  SHA512:
6
- metadata.gz: 5e1a48adcdb3d24d63adef2e70c483951c37cfa03b14f665d3ca6b7d0cf87f958010b7cfd1b55fee1303582b4d306b60cebbaa758df4909039de3ffb1816d08a
7
- data.tar.gz: 91c421904416debe2e82ab047d58563a5f2a542968cb38fb149c15390888f5f1acaea26189246bca444e8486dabf70bbd648e687368ec4ffc28161f233d60256
6
+ metadata.gz: b19853ca26dba0ec3b4c427e3af9b7d733f55de96b76101489c1678647639355ed93d49f5f51fe656df8a5808086fc4328cb5ba0a54efada2ed32745e5b3e79f
7
+ data.tar.gz: adbda33873961a4accd28008953490310e77aea725ebfb9f0e45b3338bd313a3d7964b83fc3380c5fd99826a65670017d6e0db9433f6c44fdcf5bb69bb9e486f
data/gems.rb CHANGED
@@ -1,20 +1,49 @@
1
1
  source 'https://rubygems.org'
2
+ source 'https://gems.easysoftware.com'
2
3
 
3
- gemspec
4
+ # Possible directories for dummy application
5
+ possible_app_dirs = [
6
+ ENV['DUMMY_PATH'],
7
+ File.join(Dir.pwd, 'test/dummy'),
8
+ Bundler.root.join('test/dummy'),
9
+ ]
10
+
11
+ # Find first gemfile on the possible directories
12
+ # Keep it at the end of the file (because of abort on the bottom)
13
+ gems_rb_found = false
14
+ possible_app_dirs.each do |dir|
15
+ break if gems_rb_found
16
+ next if !dir
17
+ next if !Dir.exist?(dir)
18
+
19
+ ['Gemfile', 'gems.rb'].each do |gems_rb|
20
+ gems_rb = File.expand_path(File.join(dir, gems_rb))
4
21
 
5
- # There are defined commands, after install hook and custom hooks
6
- plugin 'rys-bundler', github: 'easysoftware/rys-bundler', branch: 'master'
22
+ if File.exist?(gems_rb)
23
+ eval_gemfile(gems_rb)
24
+ gems_rb_found = true
25
+ break
26
+ end
27
+ end
28
+ end
7
29
 
8
- # Common dependencies
9
- eval_gemfile('dependencies.rb')
30
+ if !gems_rb_found
31
+ abort("Dummy application's gemfile not found")
32
+ end
10
33
 
11
- # Loading gems dependecies in right moment
12
- Plugin.hook('rys-gemfile', self)
34
+ # Current gem specification file
35
+ gemspec_file = Dir.glob(File.join(__dir__, '*.gemspec')).first
36
+
37
+ # Not valid gem
38
+ if gemspec_file.nil? || !File.exist?(gemspec_file)
39
+ abort('Gemspec not found')
40
+ end
41
+
42
+ # Dummy application may already include this gem
43
+ # You cannot specify the same gem twice
44
+ current_gem_spec = Bundler.load_gemspec(gemspec_file)
45
+ @dependencies.delete_if {|d| d.name == current_gem_spec.name }
46
+ gem "ryspec", path: "/Users/lukas/_projects/ryspec"
47
+ # Load current gem and its dependencies
48
+ gemspec
13
49
 
14
- # Loading gems from dummy application
15
- # Possible paths (by priority)
16
- # 1. As second argument
17
- # 2. Environment variable DUMMY_PATH
18
- # 3. Current_dir / test / dummy
19
- Plugin.hook('rys-load-dummy', self)
20
- gem "mautic", path: "/Users/lukas/_projects/mautic"
@@ -1,3 +1,3 @@
1
1
  module RedmineMautic
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -35,7 +35,7 @@ RSpec.describe "Submit mautic form", type: :controller do
35
35
  'submit' => '1',
36
36
  'formId' => '6' }) }))
37
37
 
38
- post :create, { user: user }
38
+ post :create, params: { user: user }
39
39
  expect(stub).to have_been_requested
40
40
  end
41
41
 
@@ -1,19 +1,20 @@
1
1
  require_relative "../spec_helper"
2
+
2
3
  RSpec.describe "/redmine_mautic", type: :request do
3
4
 
4
5
  it '#index' do
5
6
  get "/redmine_mautic"
6
- expect(response).to be_success
7
+ expect(response).to have_http_status :success
7
8
  end
8
9
 
9
10
  it '#new' do
10
11
  get "/redmine_mautic/new"
11
- expect(response).to be_success
12
+ expect(response).to have_http_status :success
12
13
  end
13
14
 
14
15
  it '#create' do
15
- post "/redmine_mautic", connection: { url: 'https://mautic.org' }
16
- expect(response).to be_success
16
+ post "/redmine_mautic", params: { connection: { url: 'https://mautic.org' }}
17
+ expect(response).to have_http_status :success
17
18
  expect(response.body).to include("connection[secret]")
18
19
  end
19
20
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redmine_mautic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukáš Pokorný
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: redmine_extensions
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: mautic
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -102,7 +116,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
116
  - !ruby/object:Gem::Version
103
117
  version: '0'
104
118
  requirements: []
105
- rubygems_version: 3.0.2
119
+ rubyforge_project:
120
+ rubygems_version: 2.7.6
106
121
  signing_key:
107
122
  specification_version: 4
108
123
  summary: Integration mautic rails gem with Redmine