ffcrm_endpoint 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YmYxNThhZjFmMWNmOTA0ZjI4ZjJkMDdiYjU0NjlkZTczNzhkMTMyZg==
4
+ MzM2OTUzMjJhYjc1YTJiOGMxMzFlMmQ3OGUwYjE3YmIyZmI4YjIzNA==
5
5
  data.tar.gz: !binary |-
6
- NDg0N2MyZWViZTFiYjMzYmQ2NzQ0NmZkM2FiMWI4MDY0MzEzMTY4Ng==
7
- !binary "U0hBNTEy":
6
+ NjUyNmY4M2I0ZWFmY2U4OWEwZDA4ODc2ZTdhMjUxMTA2ZDYwM2M2Mw==
7
+ SHA512:
8
8
  metadata.gz: !binary |-
9
- NTExZTc1MmVkODlmYWI2MTQ3YmI0ZWE0MGQxMjk0NmM4YzUyMWQwYzhkNzQw
10
- ZGUxNjVlOTAyZWEzMTgyNDU0OTQxOTQ4ODVkNTk2YTQ3MGViOGMwNjQ3ZTNk
11
- YmEyYWVhMzZjMGJhMWEzMDZmZDZhZTlmZTkzNjBlMDVhNzgxYTg=
9
+ MjYzNDg1ODhjOGQ4MWFlMGE4NjZmZjA1ODAyNzMzMzhiNDEwN2YwMjZiNTMz
10
+ OWJmM2UyNWNkZjE1MjMxOGY5Y2RhYWZiZWExN2RlMDE4NTI5YzdhNDZmYjU4
11
+ MTNhMWM3Yzg1MzExMzIzN2FlNDk4MmQzNTQ1OGIwMjY5NDQ2MWM=
12
12
  data.tar.gz: !binary |-
13
- NTcyNDU1N2M3NGY4NzQwMjE5NzIzNzUwNjY4YWE1ZTRlMDI0OWZkMzYwYWIz
14
- MDQ1NTA1MDY2YzdiYTA5ZWU3MWE0NDE0ZDNiYWI3OTc2OTdjNDVjZjY3MDQ4
15
- Njc2MzI0ODYxMjIwNmViYTViZmQyOGVmNDYxNTcyODU3ODNiNGM=
13
+ YjA5OTYzZWVhZWExZTU4NTM2NDI2Y2JmZWQyYzllOGE5OWYyNDIzYTMwMDI1
14
+ MDZkOWY4OThiNTU5MDQ2YmM4NWY3ZjQ1NTBlNGFlMzQ5MzY2YTNhM2Q1ZjEz
15
+ NTc1NDVhNWFhNTk5ODJkZmMxNmU2NDYwMWMwODg5Zjc4MDQ2MWM=
@@ -0,0 +1,12 @@
1
+ class Admin::FfcrmEndpointController < Admin::ApplicationController
2
+
3
+ before_filter :require_user
4
+ before_filter "set_current_tab('admin/ffcrm_endpoint')", :only => [ :index ]
5
+
6
+ # GET /admin/ffcrm_endpoint
7
+ #----------------------------------------------------------------------------
8
+ def index
9
+ @endpoints = FfcrmEndpoint::Endpoint.klasses
10
+ end
11
+
12
+ end
@@ -0,0 +1,11 @@
1
+ .title= t(:ffcrm_endpoint_title, default: "Registered Endpoints")
2
+
3
+ %p
4
+
5
+ %ul
6
+ - @endpoints.each do |endpoint|
7
+ %li
8
+ %strong= endpoint.to_s
9
+ at
10
+ - link = "#{root_url}endpoints/#{endpoint.to_s.demodulize.underscore}"
11
+ = link_to(link, link)
data/config/routes.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  Rails.application.routes.draw do
2
2
 
3
3
  match 'endpoints/:klass_name', controller: 'ffcrm_endpoint/endpoints', action: 'consume', via: [:get, :post, :put]
4
+ get '/admin/ffcrm_endpoint' => 'admin/ffcrm_endpoint#index', format: 'html'
4
5
 
5
6
  end
@@ -2,7 +2,13 @@ module FfcrmEndpoint
2
2
  class Engine < ::Rails::Engine
3
3
 
4
4
  config.to_prepare do
5
- require "ffcrm_endpoint/endpoint"
5
+ require "ffcrm_endpoint/endpoint"
6
+
7
+ tab_urls = FatFreeCRM::Tabs.admin.map{|tab| tab[:url]}.map{|url| url[:controller]}
8
+ unless tab_urls.include? 'admin/ffcrm_endpoint'
9
+ FatFreeCRM::Tabs.admin << { url: { controller: "admin/ffcrm_endpoint" }, text: "Endpoints"}
10
+ end
11
+
6
12
  end
7
13
 
8
14
  config.generators do |g|
@@ -1,3 +1,3 @@
1
1
  module FfcrmEndpoint
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffcrm_endpoint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Kenworthy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-23 00:00:00.000000000 Z
11
+ date: 2013-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -89,8 +89,10 @@ extensions: []
89
89
  extra_rdoc_files: []
90
90
  files:
91
91
  - app/controllers/ffcrm_endpoint/endpoints_controller.rb
92
+ - app/controllers/admin/ffcrm_endpoint_controller.rb
92
93
  - app/views/ffcrm_endpoint/endpoints/consume.js.erb
93
94
  - app/views/ffcrm_endpoint/endpoints/consume.html.haml
95
+ - app/views/admin/ffcrm_endpoint/index.html.haml
94
96
  - config/routes.rb
95
97
  - lib/ffcrm_endpoint.rb
96
98
  - lib/ffcrm_endpoint/engine.rb
@@ -155,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
157
  version: '0'
156
158
  requirements: []
157
159
  rubyforge_project:
158
- rubygems_version: 2.0.3
160
+ rubygems_version: 2.1.11
159
161
  signing_key:
160
162
  specification_version: 4
161
163
  summary: Enables Fat Free CRM to receive webhooks