Skip to content
This repository was archived by the owner on Feb 25, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
1c5176f
Merge pull request #54 from zivtech/7.x-1.x
grndlvl Dec 17, 2015
17ee2a6
Removed block_class module from bear-7.x-2.x
sk33lz Dec 21, 2015
b8fe09c
Merge pull request #56 from zivtech/remove-block_class2.x
jodyHamilton Dec 21, 2015
628bca5
Added contrib page to docs for other bear contrib modules.
sk33lz Dec 24, 2015
4917d9f
Added behat rule for radio buttons
jessica-zivtech Jan 4, 2016
84e08ec
Added a file to test default settings when creating a new content type
jessica-zivtech Jan 4, 2016
89d6867
Moved failed step to it's own scenario
jessica-zivtech Jan 5, 2016
2d361a6
Updated composer.json to require newer version of Behat Drupal Extension
jessica-zivtech Jan 5, 2016
658a7ce
Resolving specific test issues
jessica-zivtech Jan 5, 2016
1f08d78
Removing BearMedia.feature since we no longer use Media module
jkaeser Jan 12, 2016
0f5a780
Fixed behat test and AfterScenario, removed BearMedia feature and fuc…
jessica-zivtech Jan 12, 2016
4c0d528
Updated Scenario language
jessica-zivtech Jan 12, 2016
061440d
Changed bottle to foo and removed Random function, removed commented …
jessica-zivtech Jan 12, 2016
466933b
Update oembed version as we just ran into https://www.drupal.org/node…
jodyHamilton Jan 12, 2016
a226dc8
Merge pull request #60 from zivtech/NewContentChecks
jodyHamilton Jan 12, 2016
31517b5
Updates Selenium instructions
jessica-zivtech Jan 13, 2016
308dc9b
Update patches.make
jodyHamilton Jan 13, 2016
076dc55
We dont use multiform
jodyHamilton Jan 13, 2016
425bf94
LP #27392650, adding probo build environment variable.
sk33lz Jan 13, 2016
c2fcd4d
Merge pull request #63 from zivtech/proboenvvar
jodyHamilton Jan 13, 2016
e1712d2
Merge pull request #57 from zivtech/moardocs
jodyHamilton Jan 14, 2016
d38ad61
Merge pull request #61 from zivtech/readme-update
jodyHamilton Jan 14, 2016
2eaedf1
LP #27392170: tweaks to wysiwyg profiles.
Jan 19, 2016
2d1983c
Updated behat readme instructions
jessica-zivtech Jan 20, 2016
deb7cc2
Merge pull request #66 from zivtech/wysiwyg-profile-changes
jodyHamilton Jan 21, 2016
a36ed90
Merge pull request #67 from zivtech/behat-readme-7
jodyHamilton Jan 21, 2016
e20baad
unsetting checkboxes for content type creation
jkaeser Jan 22, 2016
81286ee
Update patches.make
jodyHamilton Jan 22, 2016
2ed35f8
Merge pull request #72 from zivtech/d7-remove-checkboxes
jodyHamilton Jan 26, 2016
11ac75c
This reverts commit 2c73394f47b439e6a65b405b14f141e05b93a0a0.
grndlvl Nov 17, 2015
cf4125c
Trying second style
grndlvl Nov 17, 2015
e8a39e6
Fixing format
grndlvl Nov 17, 2015
7f0cf56
Testing new bash script
grndlvl Nov 18, 2015
0bdfbdc
Adding demo file so that PR can be created for Probo.
grndlvl Dec 7, 2015
002065a
Fixing file permissions
grndlvl Dec 7, 2015
dad0c3a
Remove redundant step.
Jan 26, 2016
ca6bec4
Changing to correct bear branch.
Jan 26, 2016
7288318
Adding make file to script.
Jan 27, 2016
a52c2ed
Removing changes in prev commits.
Jan 27, 2016
c1d497f
Working to download specific bear branch in probo step.
Jan 27, 2016
c2e8f90
Revert "Working to download specific bear branch in probo step."
Jan 27, 2016
7ec4880
Removing multiform dependency.
Jan 27, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .probo.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
steps:
- name: Make and install Bear
plugin: Drupal
makeFile: build-bear.make
profileName: bear
runInstall: true
- name: Run the profile script
command: './$SRC_DIR/profile-build.sh'
- name: Run install
command: "drush site-install --root=/var/www/html bear --db-url='mysqli://root:strongpassword@localhost/bear'"
- name: Set file directory permissions
command: 'chown -R www-data:www-data /var/www/html/sites/default/files'
- name: Run behat tests
command: 'cd /var/www/html/profiles/bear/tests ; composer install ; ./bin/behat --profile probo --tags "~@javascript"'
2 changes: 0 additions & 2 deletions bear.info
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ dependencies[] = asset_document
dependencies[] = asset_image
dependencies[] = bear_habitat
dependencies[] = bear_necessities
dependencies[] = block_class
dependencies[] = breadcrumbs_by_path
dependencies[] = chosen
dependencies[] = coffee
Expand Down Expand Up @@ -56,7 +55,6 @@ dependencies[] = linkit
dependencies[] = menu_block
dependencies[] = menu_expanded
dependencies[] = module_filter
dependencies[] = multiform
dependencies[] = oembed
dependencies[] = oembedembedly
dependencies[] = page_manager_templates
Expand Down
Empty file added demo
Empty file.
9 changes: 9 additions & 0 deletions docs/contrib.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#Bear Contributed Modules
We try to keep the overall size of the bear installation profile as small as possible, but packed with the most amount of features that we use on 90% of our client projects. We have built some additional features and wrote some custom code that doesn't quite get used enough to put into the main bear release. We have moved some of these features and settings to their own bear contributed modules that can be installed on any Drupal website to add these additional features.

#Projects
- [Bear Hunt](https://www.drupal.org/project/bear_hunt) - Bear Hunt provides a quick and powerful Solr Search API bundle that sets up a Solr Server and a default node index on your Drupal site.

- [Bear Slideshow](https://www.drupal.org/project/bear_show) - Bear Slideshow is a Features package that provides a responsive Flexslider Views Slideshow out of the box.

- [Bear Homepage](https://www.drupal.org/project/bear_home) - Bear Homepage is a Features package that provides an exported page manager configuration for an easy to configure custom homepage.
2 changes: 1 addition & 1 deletion docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
- Pre-configured [CKEditor](https://www.drupal.org/project/responsive_menus) WYSIWYG with file asset management.
- Responsive [Bear Skin](https://www.drupal.org/project/bear_skin) theme with [Bear Coat](http://cgit.drupalcode.org/bear_skin/tree/bear_coat) sub-theme.
- [Responsive Menus](https://www.drupal.org/project/responsive_menus) with [SIDR](https://github.com/artberri/sidr/releases) support.
- Sticky Footer option available
- Sticky Footer option available.
- Site building and developer tools like [Views](https://www.drupal.org/project/views), [Panels](https://www.drupal.org/project/panels), [Features](https://www.drupal.org/project/features), and [Devel](https://www.drupal.org/project/views) out of the box.
- See the full list of Contrib Modules that Bear includes in our modules.md file.
1 change: 0 additions & 1 deletion docs/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Bear includes helpful contributed modules for site builders and developers with
- advagg
- asset
- bear_habitat
- block_class
- breadcrumbs_by_path
- breakpoints
- chosen
Expand Down
4 changes: 1 addition & 3 deletions drupal-org.make
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ projects[asset][patch][] = "https://www.drupal.org/files/issues/asset-youtube-vi
; @see https://www.drupal.org/node/2612602#comment-10550910
projects[asset][patch][] = https://www.drupal.org/files/issues/2612602-3-asset-inline_entity_form_integration.patch
projects[] = bear_habitat
projects[] = block_class
projects[] = breadcrumbs_by_path
projects[] = breakpoints
projects[] = chosen
Expand Down Expand Up @@ -53,8 +52,7 @@ projects[linkit][version] = "2.x-dev"
projects[] = menu_block
projects[] = menu_expanded
projects[] = module_filter
projects[] = multiform
projects[] = oembed
projects[oembed][version] = "1.x-dev"
projects[] = page_manager_templates
projects[] = panels
projects[panelizer][version] = "3.x-dev"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,20 @@ function bear_necessities_default_environment_indicator_environment() {
);
$export['staging_environment'] = $environment;

$environment = new stdClass();
$environment->disabled = FALSE; /* Edit this to true to make a default environment disabled initially */
$environment->api_version = 1;
$environment->machine = 'probo_environment';
$environment->name = 'Probo environment';
$environment->regexurl = '.*probo.*';
$environment->settings = array(
'color' => '#6B044C',
'text_color' => '#ffffff',
'weight' => '95',
'position' => 'top',
'fixed' => 1,
);
$export['probo_environment'] = $environment;

return $export;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ function bear_necessities_ckeditor_profile_defaults() {
'settings' => array(
'ss' => 2,
'toolbar' => '[
[\'Bold\',\'Italic\',\'Link\',\'Anchor\'],
[\'Format\',\'RemoveFormat\',\'JustifyLeft\',\'JustifyCenter\',\'JustifyRight\',\'JustifyBlock\',\'NumberedList\',\'BulletedList\',\'Table\'],
[\'Bold\',\'Italic\'],
[\'Format\',\'Scayt\',\'RemoveFormat\',\'JustifyLeft\',\'JustifyCenter\',\'JustifyRight\',\'JustifyBlock\',\'NumberedList\',\'BulletedList\',\'Table\'],
[\'Blockquote\',\'PasteFromWord\',\'linkit\',\'asset_document\',\'asset_image\',\'asset_embed\',\'assetSearch\']
]',
'expand' => 't',
Expand All @@ -31,7 +31,7 @@ function bear_necessities_ckeditor_profile_defaults() {
'extraAllowedContent' => '',
'enter_mode' => 'br',
'shift_enter_mode' => 'br',
'font_format' => 'p;div;pre;h2;h3;h4;h5;h6',
'font_format' => 'p;h2;h3;h4;h5',
'custom_formatting' => 't',
'formatting' => array(
'custom_formatting_options' => array(
Expand All @@ -58,9 +58,10 @@ function bear_necessities_ckeditor_profile_defaults() {
'html_entities' => 'f',
'scayt_autoStartup' => 't',
'theme_config_js' => 'f',
'js_conf' => 'config.fillEmptyBlocks = false;
config.tabSpaces = 0;
config.autoParagraph = false;',
'js_conf' => 'config.fillEmptyBlocks = false;
config.tabSpaces = 0;
config.autoParagraph = false;
config.scayt_autoStartup = true;',
'loadPlugins' => array(
'asset' => array(
'name' => 'asset',
Expand Down Expand Up @@ -142,21 +143,16 @@ config.autoParagraph = false;',
'settings' => array(
'ss' => 2,
'toolbar' => '[
[\'Source\'],
[\'Cut\',\'Copy\',\'Paste\',\'PasteText\',\'PasteFromWord\',\'-\',\'SpellChecker\',\'Scayt\'],
[\'Undo\',\'Redo\',\'Find\',\'Replace\',\'-\',\'SelectAll\'],
[\'Image\',\'Flash\',\'Table\',\'HorizontalRule\',\'Smiley\',\'SpecialChar\',\'Iframe\'],
\'/\',
[\'Bold\',\'Italic\',\'Underline\',\'Strike\',\'-\',\'Subscript\',\'Superscript\',\'-\',\'RemoveFormat\'],
[\'NumberedList\',\'BulletedList\',\'-\',\'Outdent\',\'Indent\',\'Blockquote\',\'CreateDiv\'],
[\'JustifyLeft\',\'JustifyCenter\',\'JustifyRight\',\'JustifyBlock\',\'-\',\'BidiLtr\',\'BidiRtl\',\'-\',\'Language\'],
[\'Link\',\'Unlink\',\'Anchor\'],
[\'Format\'],
[\'NumberedList\',\'BulletedList\',\'Blockquote\',\'Table\'],
[\'JustifyLeft\',\'JustifyCenter\',\'JustifyRight\'],
\'/\',
[\'Format\',\'Font\',\'FontSize\'],
[\'TextColor\',\'BGColor\'],
[\'Maximize\',\'ShowBlocks\'],
[\'DrupalBreak\'],
[\'asset_document\',\'asset_image\',\'asset_embed\',\'assetSearch\']
[\'PasteText\',\'PasteFromWord\',\'-\',\'Scayt\'],
[\'Undo\',\'Redo\',\'-\',\'SelectAll\'],
[\'Maximize\'],
[\'asset_document\',\'asset_image\',\'asset_embed\',\'assetSearch\'],
[\'Source\']
]',
'expand' => 't',
'default' => 't',
Expand Down Expand Up @@ -198,7 +194,8 @@ config.autoParagraph = false;',
'html_entities' => 'f',
'scayt_autoStartup' => 'f',
'theme_config_js' => 'f',
'js_conf' => '',
'js_conf' => 'config.allowedContent = true;
config.scayt_autoStartup = true;',
'loadPlugins' => array(
'asset' => array(
'name' => 'asset',
Expand Down
4 changes: 4 additions & 0 deletions modules/bear_necessities/bear_necessities.module
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ function bear_necessities_form_node_type_form_alter(&$form, &$form_state, $form_
// Set publishing options.
$form['workflow']['node_options']['#default_value'] = array('status', 'revision');

// Unset 'promote to frontpage' and 'make sticky' options.
unset($form['workflow']['node_options']['#options']['promote']);
unset($form['workflow']['node_options']['#options']['sticky']);

// Unset display author information.
$form['display']['node_submitted']['#default_value'] = FALSE;

Expand Down
9 changes: 8 additions & 1 deletion patches.make
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
; This patches.make file is used by https://bitbucket.org/davereid/drush-patchfile
; Our project contains patches for both Drupal core and contrib modules/themes.

; When a page has multilple URL aliases, treat one as canonical.
; @see https://www.drupal.org/node/1934086#comment-7137850
projects[drupal][patch][] = "http://drupal.org/files/drupal-1934086-path_load_order-1.patch"

; When a page has multiple menu items, treat one as canonical.
; @see https://www.drupal.org/node/1875824#comment-7420862
projects[drupal][patch][] = "http://drupal.org/files/core-1875824-3-d7.patch"

; Prevent AJAX errors on autocompletes.
; @see https://www.drupal.org/node/1232416#comment-8262487
projects[drupal][patch][] = "http://drupal.org/files/issues/fix_for_autocomplete_terminated_error-1232416-156.patch"

; Fix a PHP notice relating to file uploads.
; @see https://www.drupal.org/node/1903010#comment-8415695
projects[drupal][patch][] = "http://drupal.org/files/issues/drupal-undefinedindex_fileupload-1903010-4.patch"

; When configuring fields with a cardinality > 1, provide an option to not use drag and drop tables.
; @see https://www.drupal.org/node/2264739
projects[drupal][patch][] = "http://drupal.org/files/issues/death-to-tabledrag.patch"

; Allow schema-relative URLs.
; @see https://www.drupal.org/node/1783278#comment-9735933
projects[drupal][patch][] = "https://www.drupal.org/files/issues/schema-relative-1783278-17-D7-do-not-test.patch"


; Prevent alter hooks from making Features appear as overridden.
; @see https://www.drupal.org/node/766264#comment-8818877
projects[features][patch][] = "http://www.drupal.org/files/issues/alter_overrides-766264-45.patch"

Expand Down
41 changes: 41 additions & 0 deletions profile-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash

PROFILE_NAME='bear'
MAKE_FILE=''
SRC_DIR='/src'
DESTINATION='/var/www/html'

function checkMakeFile() {
# Matches the following:
# projects[bear]
# projects[] = 'bear'
# projects[] = "bear"
# projects[] = bear
# projects[]=bear
if grep "\[$PROFILE_NAME\]" $1 > /dev/null || grep "['\"]\?$PROFILE_NAME['\"]\?$" $1 > /dev/null; then
echo 'Error: Project should not be listed in make file.' >&2
exit 1
fi
return
}

if [ "$SRC_DIR/$MAKE_FILE" != '' ] && [ -f "$SRC_DIR/$MAKE_FILE" ]; then
checkMakeFile "$SRC_DIR/$MAKE_FILE"

drush make "$SRC_DIR/$MAKE_FILE" $DESTINATION
elif [ -f "$SRC_DIR/drupal-org-core.make" ] && [ -f "$SRC_DIR/drupal-org.make" ]; then
checkMakeFile "$SRC_DIR/drupal-org-core.make"
checkMakeFile "$SRC_DIR/drupal-org.make"

drush make "$SRC_DIR/drupal-org-core.make" $DESTINATION
cd $SRC_DIR
drush make "drupal-org.make" --contrib-destination=. --no-core . -y
cd -
fi

if [ ! -d "$DESTINATION/profiles/$PROFILE_NAME" ]; then
cp -r $SRC_DIR "$DESTINATION/profiles/$PROFILE_NAME"
else
echo 'Error: Unable to copy profile to destination because it already exists.' >&2
exit 1
fi
42 changes: 22 additions & 20 deletions tests/README.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
To set up test framework, run composer install in this directory.
To Run Behat Tests in your VM:
------------------------------
Follow these steps first to set up behat on your VM.

After the installer runs, add your site to your machine's hosts file so the tests will be able to interact with the site.
1. To set up test framework, in this directory run: composer install

Edit behat.yml to set the base_url and webroot properly.
2. If you are runnning this on a virtual machine, add your local site to your vm's hosts file so the tests will be able to interact with the site. Verify that your machine can resolve the domain by pinging it.

If you do not have Selenium setup, you can only run tests with Goutte, which means tests will not use Javascript.
To run only tests that don't require Javascript, use:
bin/behat --tags "~@javascript"
3. Edit behat.yml to set the base_url and webroot properly.

4. If you do not have Selenium setup, you can only run tests with Goutte, which means tests will not use Javascript. To run only tests that don't require Javascript, use: bin/behat --tags "~@javascript"

The tests must be run from the machine hosting the site.

To run tests with Selenium (tests with '@javascript' tag):
wget http://selenium.googlecode.com/files/selenium-server-standalone-2.44.0.jar
[May need to visit the website to determine the latest Selenium version]
sudo apt-get install xvfb
We need an older version of firefox, but we also need dependencies, so first: sudo apt-get install firefox
Then remove it (the dependencies will stay though): sudo apt-get remove firefox
Now get the older version:
wget https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/31.0/linux-i686/en-US/firefox-31.0.tar.bz2
tar xvf firefox-31.0.tar.bz2
Move the extracted firefox directory: mv firefox/ /opt/
sudo ln -s /opt/firefox/firefox /usr/bin/firefox
xvfb-run firefox to test that firefox works. You may get an error: Xlib: extension "RANDR" missing on display ":99". That's safe to ignore.
xvfb-run java -jar selenium-server-standalone-2.45.0.jar
Run behat tests in another terminal window

To Run Javascript Tests:
------------------------
To run tests with Selenium (tests with '@javascript' tag).

1. Go to http://docs.seleniumhq.org/download/ and download the latest Selenium Standalone Server (currently ver. 2.48.2)

2. To install the X virtual framebuffer, run: sudo apt-get install xvfb

3. To install latest version of Firefox, run: sudo apt-get install firefox

4. Run the Selenium .jar file: xvfb-run java -jar selenium-server-standalone-2.48.2.jar

You will need to keep this window open when running javascript tests, so run the behat tests in a new tab. Make sure to stop running the file and close the tab when you are done.
40 changes: 22 additions & 18 deletions tests/behat.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,39 @@
default:
#suites:
# default:
# contexts:
# - FeatureContext
# - Drupal\DrupalExtension\Context\DrupalContext
# - Drupal\DrupalExtension\Context\MinkContext
suites:
default:
contexts:
- FeatureContext
- Drupal\DrupalExtension\Context\DrupalContext
- Drupal\DrupalExtension\Context\MinkContext
- Drupal\DrupalExtension\Context\MessageContext
- Drupal\DrupalExtension\Context\DrushContext
extensions:
Behat\MinkExtension\Extension:
Behat\MinkExtension:
goutte: ~
selenium2: ~
base_url: http://bear_updates.local
Drupal\DrupalExtension\Extension:
base_url: http://beartests.local
Drupal\DrupalExtension:
blackbox: ~
api_driver: 'drupal'
drush:
alias: 'local'
drupal:
drupal_root: '/var/www/bear_updates/webroot'
drupal_root: '/var/www/beartests/webroot'
probo:
#suites:
# default:
# contexts:
# - FeatureContext
# - Drupal\DrupalExtension\Context\DrupalContext
# - Drupal\DrupalExtension\Context\MinkContext
suites:
default:
contexts:
- FeatureContext
- Drupal\DrupalExtension\Context\DrupalContext
- Drupal\DrupalExtension\Context\MinkContext
- Drupal\DrupalExtension\Context\MessageContext
- Drupal\DrupalExtension\Context\DrushContext
extensions:
Behat\MinkExtension\Extension:
Behat\MinkExtension:
goutte: ~
selenium2: ~
base_url: http://localhost
Drupal\DrupalExtension\Extension:
Drupal\DrupalExtension:
blackbox: ~
api_driver: 'drupal'
drush:
Expand Down
14 changes: 1 addition & 13 deletions tests/composer.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
{
"require": {
"drupal/drupal-extension": "1.0.2",

"symfony/css-selector": "2.4.2",
"symfony/finder": "2.4.2",
"symfony/yaml": "2.4.2",
"symfony/translation": "2.4.2",
"symfony/event-dispatcher": "2.4.2",
"symfony/filesystem": "2.4.2",
"symfony/config": "2.4.2",
"symfony/console": "2.4.2",
"symfony/process": "2.4.2",
"symfony/dom-crawler": "2.4.2",
"symfony/browser-kit": "2.4.2"
"drupal/drupal-extension": "~3.0"
},
"config": {
"bin-dir": "bin/"
Expand Down
Loading